Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu 10.04 with KDE on it.

I am facing a problem in connecting to wired LAN internet connection.

Can any one tell me the procedure on how to connect to wired LAN internet connection through terminal..

I want to connect to wired internet connection with static IP and authentication.

share|improve this question
up vote 4 down vote accepted

All the details you need should be found here:

share|improve this answer
Thanks buddy..Problem resolved – javanoob Nov 19 '10 at 15:10
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Aug 11 '12 at 22:05
-1 answers containing only a link are volatile and against the rules of the site. I hope this down vote convinces you to follow the site rules – Braden Best Jun 27 at 15:18

This is just a modified version of:

How to configure the network interface using the terminal

You can configure a network interface from the command line using the networking utilities. You configure your network client hosts with the command line by using commands to change your current settings or by editing a number of system files. To configure your network interface card to automatically connect when wired cable is connected you can follow this "simple" steps:

  1. Configuring DHCP address for your network card

    To configure DHCP address, edit the /etc/network/interfaces and enter the following lines replacing eth0 in the example with your network interface card:

    sudo nano /etc/network/interfaces

    You should see something similar to this:

    auto eth0  
    iface eth0 inet dhcp

    in my computer it looks like this:

    auto lo  
    iface lo inet loopback

    So if your network card appears as eth2 for example then you would leave the file like this:

    auto eth2  
    iface eth2 inet dhcp
  2. Just in case you want to configure a static IP address for your network card

    Same procedure as above but you would need to include more information.

    Like above, replace eth0 with your networks card name:

    sudo nano /etc/network/interfaces

    Example File:

    auto eth0  
    iface eth0 inet static  

    After entering all the details which are needed for your static IP you would need to restart networking services using the following command:

    sudo /etc/init.d/networking restart

  3. Setting up DNS

    You can add hostname and/or IP addresses to the file /etc/hosts for static lookups.

    To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.

    For example a machine which should perform lookups from the DNS server at IP address would have a resolv.conf file looking like this:

    sudo nano /etc/resolv.conf


    in my case it looks like this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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