12

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??

0

2 Answers 2

13

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

0

ifconfig eth0 192.168.1.123 up (obviously adjust the IP address for your local network) should do the trick in a pinch. It's possible your ethernet adapter isn't eth0; using "ifconfig -a" or "ip link" should at least show you the interfaces for you to configure them.

1

Not the answer you're looking for? Browse other questions tagged .