I know I can use ifconfig to configure my ethernet network interfaces. But can I also configure my wireless network interfaces using ifconfig. (It seems to be listed as eth1 in ifconfig output, why is that ?) Specifically :

  1. How do I check from command line if my wireless is enabled
  2. How do I enable / disable the wireless using commandline
  3. Out of a few available wireless networks how do I chose one and connect to it
  4. How do I configure the parameters (like username, password, security settings and certificate information) from the command line
  5. Sometimes an available wireless network is not visible for some reason. In such a case, I select "Connect to hidden wireless network" and type the name of the connection. How do I do the same from my terminal
  6. I recently installed xmonad, I'd like to know how to start the graphical network manager from command line
  7. How do I change my system-wide proxy settings from command line ?

(I am using Ubuntu natty.)

  • 1
    If you want pure CLI you'll need to stop network-manager; then you'll need iwconfig to manage wireless settings. And ifconfig to configure your interface IP settings (or dhcpclient if there is a dhcpd around). Also you should look at the wpa_supplicant command for WPA stuff if you need to.
    – hmontoliu
    Commented Sep 27, 2011 at 18:59

1 Answer 1


Since version 0.8.1, Network Manager comes with a command line tool, nmcli. Its capabilities in older versions are very limited; for the most part, you can use it to view available connections and switch between them but not configure new ones. Since version 0.9.6, nmcli can create new connections.

There are other, third-party command-line interfaces to Network Manager. Cnetworkmanager has more features than nmcli; in particular, it allows defining connections and specifying wifi encryption keys.

An alternative to Network Manager is Wicd, which provides both an X interface and a console interface.

If you want to do things “by hand”, the main tools you'll need to know are:

  • ifconfig for general information and activation of network interfaces.
  • iwconfig for settings that are specific to wifi interfaces, in particular the ESSID (network name) and WEP keys.
  • iwlist to get information about possible settings for a wireless interface (in particular iwlist scan to show available networks). A hidden network is one that won't show up on iwlist scan but still works when selected with iwconfig.
  • Wpa_supplicant to configure WPA-protected networks.

Some of your questions are completely unrelated to wifi configuration, so I'm not going to answer them here. Please don't ask unrelated questions in the same post.


You must log in to answer this question.

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