Linux‎ > ‎Linux-Networking‎ > ‎

Basics - Changing IP

posted Oct 7, 2012, 9:36 PM by Joe Bieber
To change the IP address of a networking adapter, you need to modify the /etc/network/interfaces file.
Open a terminal and use your favorite text editor to make your changes.
In a graphical desktop environment, like Ubuntu, Mint, Etc. you can right-click on the network icon on the panel and select "edit connections". 

sudo gedit /etc/network/interfaces
sudo pluma /etc/network/interfaces

In a non-gui server environment, I like to use 'nano'(It's easy) or you can use 'vim'(takes a bit to get used to).

sudo nano /etc/network/interfaces

sudo vi /etc/network/interfaces

auto eth0 
iface eth0 inet static 

Once you've saved your changes, you need to restart networking in order for your new settings to take effect.
Here's how:

sudo /etc/init.d/networking restart

Use ifconfig to confirm your settings have changed.