Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

marked as duplicate by Alvar, izx, Mitch, Eliah Kagan, hbdgaf Aug 11 '12 at 22:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

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

share|improve this answer

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.

share|improve this answer
    
Didn't work. :( –  Akshit Baunthiyal Aug 11 '12 at 12:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.