Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 have installed Debian Squeeze (minimal -- no DE) and I would like to connect to my network (via wireless) via command line. I have used Arch Linux before and I really liked the simplicity of netcfg which I used to connect to my network.

Is there an equivalent tool/program available in Debian that I can use?

share|improve this question

To connect to wireless via command line, the simplest thing is to install and use the wicd-curses package.

In alternative, you should fight with wpa_supplicant configuration files.

share|improve this answer
-1 i hate wicd. it interferes with the network configuration files (/etc/network/interfaces in debian). maybe that's why you wrote 'fight' and not 'customize'? the syntax of that file is pitifully easy, is it not? – ixtmixilix Feb 12 '12 at 1:14
there's also wicd-cli that might worth a shot – Thiago F Macedo Feb 28 '13 at 20:57

On a machine where the network configuration doesn't change often, you can set it in /etc/network/interfaces. This file is documented in the interfaces(5) man page. Install the wireless-tools and wpasupplicant packages to manage wireless interfaces. The wpasupplicant documentation has information on what to add to /etc/network/interfaces.

On a laptop where you need to set the wifi connection parameters anew for each network, it's a lot easier to use either Network Manager (which has no good command line client that I know of) or wicd, which does.

share|improve this answer
It's also possible to get by with only wpa_supplicant, which besides the static configuration files also provides command interfaces like wpa_cli and wpa_gui for dynamic configuration and switching between networks. I use it because I prefer not being dependent on a GUI for network access. – jw013 Feb 12 '12 at 7:35

ceni is a good alternative, though it's not in the repo.

share|improve this answer

Coming from Debian I had some trouble getting netcfg to do my bidding. I found it easier in debian just using wpa_supplicant something along the lines of

in /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

and /etc/wpa.conf contains the meat of the wifi connection:

  pairwise=CCMP TKIP
  group=CCMP TKIP
  psk="mywifi preshared key in clear"

you can have several network definitions. I use it for basic roaming.

The psk in clear text in not ideal. you can mitigate it by giving your conf file a 600 permission. There is also the possibility to store a hash of the key. Check the man wpa_supplicant for more details.

Finally this sets up a system wide network profile which is exactly my use case (headless wireless appliance). Wicd and the like are also able to handle user network profiles.

As a side note: it is possible to install and use network manager on the command line only. check man nmcli . this may or may not fit your need.

share|improve this answer

There's a netcfg package listed here, have you tried installing it? or is it different from the arch netcfg?

share|improve this answer
If you follows one of the links (for the various Debian versions) you get the following description: Warning: This package is intended for the use in building debian-installer images only. Do not install it on a normal Debian system. – enzotib Feb 1 '12 at 16:40
It also appears to be an old version. – bsd Feb 1 '12 at 21:33

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.