Set up networking

From Linuxintro

IP address

To read and set your IP address one time use the command

ifconfig

To set your IP address so it survives a reboot find out your distribution and proceed accordingly

Debian based distributions

In Debian based distributions configure your IP address in /etc/networking/interfaces like this: iface eth0 inet static

address 192.168.0.42
netmask 255.255.255.0
gateway 192.168.0.1

Gateway

route add default gw 192.168.0.1

Name Server

Enter it into /etc/resolv.conf