First, get the list of recognized interfaces with an /sbin/ifconfig -a
.
If you don't see any eth*
interfaces, and you have an Ethernet adaptor installed, it wasn't detected. These days this is quite rare unless you have a card needing a firmware image to be loaded.
Assuming you find an eth0
interface, you want to issue an /sbin/ifconfig eth0 up
to bring it up. Then a dhclient eth0
to get an IP via DHCP. If you want to set an IP address manually it's /sbin/ifconfig eth0 {ip address} netmask {net mask}
; you'll also want to edit /etc/resolv.conf
to point to your DNS servers (use 8.8.8.8 and 8.8.4.4, which are Google's public DNS servers, if you are in a pinch.)
apt-get
and all that should work now.
Next, type man interfaces
which will explain how to edit /etc/network/interfaces
and get Debian to do all this automatically for you at next reboot.
1Also,
ifconfig
is/sbin/ifconfig
which isn't in a user'sPATH
on Debian. You will need to call it with the full path as a user. – Benjamin Bannier – 2011-07-21T14:30:39.2331You forgot to remove the first sentence as well. – tshepang – 2011-07-21T17:41:32.567