Configure Linux Mint to use a Static IP Address

If you want Linux Mint to connect to your network using a static IP address, you will need to edit the following file (this file needs to be edited as root):

/etc/network/interfaces

By default, this file will contain lines:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

To setup your ethernet interface (eth0) to connect using a static IP, simply append the following lines to this file:

iface eth0 inet static
address xxx.xxx.xxx.xxx (your static IP address)
netmask xxx.xxx.xxx.xxx (your desired netmask, usually 255.255.255.0)
gateway xxx.xxx.xxx.xxx (your router’s IP address)
dns-nameservers xxx.xxx.xxx.xxx (your desired DNS server (can be the your router’s IP address)

Once the file is saved, you will need to restart your system for your changes to take effect (sometimes you may need to issue the ifup command (ifup eth0) to bring up the ethernet interface (eth0) following a reboot).

Posted in Linux, Network, Technology, Tips and tagged , , , .