Unformatted text preview: How to configure a static IP address in Linux By Steve Harrison Step 1: Find the current default gateway before changing the adapter ~$ route Step 2: First you need to disable the network adapter you are about to reconfigure ~$ sudo ifdown eth0 Step 3: Using an editor of your choice open the following configuration file ~$ sudo nano /etc/network/interfaces Change the configuration to the following: Note – Use your own IP addressing Auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.0 gateway 192.168.1.1 broadcast 192.168.1.255 dns-‐nameservers 22.214.171.124 Step 4. Save and exit the file Step 5. Enable the network adapter next ~$ sudo ifup eth0 Step 6. Check the configuration by entering the following ~$ ifconfig eth0 (Optional) If you do not see your changes enter the following command or reboot. ~$ sudo service networking restart...
View Full Document
- Spring '15
- IP address, Sudo, Steve Harrison