Super User is a question and answer site for computer enthusiasts and power users. 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

When I run cat /etc/network/interfaces in Ubuntu 11.04 I get the below output.

auto lo
iface lo inet loopback

I don't see the eth0 or eth1 interfaces, but I am able to see them in the Network Tools application.

How do I configure the eth0 and eth1 from command line?

share|improve this question

If an interface is not in /etc/network/interfaces, but you want it to be there, then why don't you just add it there? It is a text file, the kind you can edit.

The standard tools for manual network interface configuration are ip from iproute2 and/or ifconfig (along with route and arp) from the deprecated net-tools. They both allow you to change IP addresses, routes, and such. For automatic configuration via DHCPv4, either dhclient or dhcpcd can be used.

(Most of these programs are in /sbin, so look there if you get a "command not found".)

share|improve this answer

To find the file where you can configure your other interfaces have a look at this file (by default on ubuntu):


For your second question use 'ifconfig'.

share|improve this answer
Shadok, In "/etc/dhcp/dhclient.conf" most of the lines are commented with #. I don't see the details for eth0 and eth1. When I run "ifconfig" I see the details for lo, eth0 and eth1. I am trying to add a metric for the interfaces, so that I can add priority to the interfaces. Where are the details for eth0 and eth1 stored? – Praveen Sripati Sep 9 '11 at 14:41
You should find a block concerning eth0 in your dhclient.conf file, if not you can copy one of the existing ones and adapt it. 'metric' is an argument to 'ifconfig', see the man for more details. Try it from the command line and if it works and you want that setting permanent add it to your dhclient.conf – Shadok Sep 9 '11 at 14:43

You must log in to answer this question.

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