I will show how to set a static IP of 192.168.0.101 on a network with a gateway of 192.168.0.1.
Open the configuration file in your favorite editor (mine is nano)
sudo nano /etc/network/interfaces
Comment out the section where dhcp is being used (put the # in front of the line):
#iface eth0 inet dhcp
Add a section like this example:
iface eth0 inet static
Reboot and you’re done!
Leave a Reply