Today I will show you how to set a static ip address in Linux. Because my main system is Linux Mint 11 I will also show you the GUI way for gnome based distributions.
The following steps work on any distribution
Open up a terminal and type:
sudo nano /etc/network/interfaces
Find the following lines;
auto eth0
iface eth0 inet dhcp
and replace with;
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
broadcast address 192.168.1.255
where address, netmask and gateway are set using addresses relevant to your network. Restart the system and that is it.
GUI for Gnome and Cinnamon
(Unity is the same method but the icon is top right instead)
1. Right click on your internet connection (bottom right of screen) and chose edit connections.
2. Chose your connection from the list and click Edit.
3. Click on the IPv4 Settings tab.
4. Change method from DHCP to manual.
5. Enter your details for address, netmask and default gateway.
6. Add an address for your DNS server and click apply.
7. Restart your system for changes to take effect.
About the Author
Hi I am Chris Wakefield the owner of ComTech IT Support. I provide Windows, Linux and Mac based IT Support to small businesses throughout the Stirling, Falkirk and Alloa areas.
For a list of what I can offer you why not visit my website www.comtech247.net where you will find a list of my services, testimonials, blog and much more.
Pingback: Pozycjonowanie Wroc?aw
Hi Ben,
Your DNS server is usually your router (default gateway) on a home network. Do you know what your ip address is? If your ip address starts with 192.168.x.x then chances are your netmask would be 255.255.255.0 If your address starts with 10.x.x.x then your netmask will be 255.0.0.0
Chris
I followed this up to:
5. Enter your details for address, netmask and default gateway.
6. Add an address for your DNS server and click apply.
I never knew I had a DNS server and have no details as to what address or netmask or default gateway to enter.
Saved as a favorite, I enjoy your site! :)
Found your webblog through Stumbleupon. You know I will be subscribing to your rss.