Static ip address

Debian Static IP Address

So you want to give your Debian box a static ip follows these steps carefully and you will be up and running in no time. You will need to edit a file for this to work, to edit files we use a text editor. Linux has several text editors you can use. If you want to edit your files using a nice gui you can use Kate if you like to work in the cli you can simply open a terminal and use vi

You will notice your file looks similar to mine below

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet dhcp

###################################################################################

This is what you want your file to look like

# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
What changes did I make 

You can change the address to whatever you want it to be so long as it does not clash with another computer on your lan that has the same address.