Difference between revisions of "Set up networking"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
Line 5: Line 5:
  
 
== Debian based distributions ==
 
== Debian based distributions ==
Configure your IP address in /etc/networking/interfaces like this:
+
In [[Debian based distributions]] configure your IP address in /etc/networking/interfaces like this:
 
iface eth0 inet static
 
iface eth0 inet static
 
  address 192.168.0.42
 
  address 192.168.0.42

Latest revision as of 08:08, 15 July 2012

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