Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had been using Ubuntu for some time, but no really comfortable with the Ubuntu networking concepts from command line. I searched on the internet, but could not find any nice tutorials for configuring the network from the command line. Any pointers?

share|improve this question

closed as off-topic by Journeyman Geek, ncdownpat, mpy, Tog, Carl B Oct 19 '13 at 21:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. Here are a few suggestions on how to properly ask this type of question." – Journeyman Geek, ncdownpat, mpy, Tog, Carl B
If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

Here is a good tutorial on Linux Network Configuration

http://www.youtube.com/watch?v=PEa1xopeufQ

There are a couple of other nice tutorials from the same guy.

share|improve this answer

Ubuntu by default uses the NetworkManager software for network configuration, which is designed to be used from a GUI. There are some command-line tools for it (nmcli, cnetworkmanager), but their functionality is very limited compared to the GUI.

Debian (and Ubuntu) have a very basic network configuration system, separate from NetworkManager, in the form of /etc/network/iterfaces and the ifup and ifdown commands. However, this is not much more than shortcuts to a few commands (like ifconfig and route). They do not appear to have advanced features like dependencies and event-driven configuration. For example, they cannot handle the network cable being pulled in or out, to deconfigure the interface when the cable is out. The /etc/network/interfaces system is documented by Debian, see http://wiki.debian.org/NetworkConfiguration .

There is some software (e.g. ifplugd) that will solve this by monitoring the state of network interface and invoking the ifup or ifdown commands when interface state changes. However, this is still limited to responding just to the interface state, and can't be used for e.g. dependencies between interfaces (example: VPN should only start when LAN is up).

If you need more powerful configuration, I recommend that you try out this software that I'm developing, which allows you to specify your network configuration in a simple but very powerful programming language: http://code.google.com/p/badvpn/wiki/NCD

Also see a similar question: How to configure `eth0` to retry `dhclient` when unplugged and replugged?

share|improve this answer

Ubuntu is Debian based so documentation for Debian may be useful.

I would also recommend the book "Ubuntu Linux Toolbox" by Cristopher Negus and Francois Caen. It is basically a book of command line recipes for Ubuntu and includes a chapter about network setup.

share|improve this answer

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