How to connect to wired connection from the terminal [duplicate]

Possible Duplicate:
How to connect to Wired internet connection through terminal?

i corrupted my Xorg while experimenting on my system so I had to forcibly drop to Command Line.

However, my question is this - How do I connect to wired connection from the command line??


From ubuntugeek.com:

Place the following into /etc/network/interfaces with an editor.

It will cause the network manager to bring up your Ethernet automatically and configure it with DHCP.

auto eth0
iface eth0 inet dhcp

As Morgan correctly suggested you can find out if you should use something other than eth0 to refer to your wired connection by using the command ip link.

After adding this restart the network manager with:

sudo /etc/init.d/networking restart

(You should get an error message).

If this doesn't work you can try:

sudo ifdown eth0
sudo ifup eth0

And if that doesn't work you can reboot.

If all this doesn't work for you please mention in your question what you tried and what messages you got. You might find more information at the bottom of /var/log/syslog if you look right after you try it. tail -n 50 /var/log/syslog