- sudo nano /etc/network/interfaces
change iface eth0 (or whatever the adapter is) from dhcp to static (just replace the word dhcp to static
tab indent all of the following
type address [IP]
type netmask [your subnet mask]
network [your network, use zeros for avaiable IPs on the network]
broadcast [broadcast IP]
gateway [your gateway]
dns-nameservers 8.8.8.8 8.8.4.4
- crtl+x
- yes
- enter
Example:
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4