Unix: Manual Network Setup

Graphical network control panels aren't always available. This is a quick way of setting up networking from the command line. None of these changes will survive a reboot.

Replace "eth0" with whatever the network card name is from a straight "ifconfig".

To turn off an interface:
ifconfig eth0 down
To turn on an interface:
ifconfig eth0 up

To set an IP address:
ifconfig eth0 192.168.1.2 netmask 255.255.255.0

To set the default gateway:
route add default gw 192.168.1.1
You can only run this command once unless you delete the old route first (if present).
route del default gw
To see current routing table:
route -vn

To set up name resolution, you'll need to add the DNS server IP in /etc/resolv.conf:
nameserver 192.168.1.10

You can use the man pages to check more syntax and examples if you need.
man ifconfig
man route
man resolv.conf