I consider myself mildly proficient with command line, and I'm sure if I tried hard enough, I'd eventually be able to connect to my wifi network using ifconfig, iwconfig, dhclient, etc. and lots of googling

But I was wondering if there is any linux command line tool that bundles all those network / wifi commands into one single command so that I can just type in the username and password (if applicable) and it'll do all the internal stuff for me? Basically a command line utility that is as easy to use as the Network Manager gui tool most distros provide.

Ideally I'd want something as simple as dowifimagic -u my_username -p my_password

  • I suggest wpa_supplicant; you store config file in /etc/wpa_supplicant/wpa_supplicant.conf, and connect with wpa_supplicant -B -i interfacename Commented Nov 17, 2016 at 13:56

2 Answers 2


NetworkManager (since you are already familiar with it) has a command line tool called nmcli. That might be what you are after.

Documentation here. And here. And from the superb Arch-Wiki here.

  • Where the magic command is: nmcli device wifi connect <SSID> password <password>
    – Mikolasan
    Commented Aug 26, 2020 at 19:55

Yes, ceni

"A Curses user interface for configuring network interfaces with ifupdown. Ceni can manage basic network interface ifupdown configuration stanzas for ethernet and wireless devices."

or wicd-cli

"wired and wireless network manager - scriptable console client"

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