How to connect to a Wifi with Ubuntu CLI

Hi folks,

due to my minimal window manager ‘Awesome’ I was faced a problem. How am I able to connect to a Wifi just with Ubuntu CLI?

Lets explain the background of the problem. I really do not like the Unity window manager at all, but the laptop that was provided to me had a standard Ubuntu installation with, as you already expect, Unity. So, I bascically have all the overloaded Ubuntu stuff, programs, etc. somewhere in the background. Due to this whole setup I also have the NetworkManager dependencies on the laptop. To be honest, I really, really appreciate the running out-of-the-box approach of Ubuntu.

It is extremely easy to get connected to a specific Wifi with Ubuntu and/or NetworkManager.

The solution?
nmcli
is what are you looking for.

I remember the ‘good old days back’ when doing some sudo wpa_supplicant -D wext ... magic on CLI.
The solution with nmcli is super easy as you can see right here:

After you waited a few seconds, you are finished and successfully connected to the AP. Easy as that.

If anyone needs additional information about the command we used (extracted from man nmcli device section):

As you probably already know:
Feel free ask, share or comment where you would like to provide any feedback. It is really appreciated!

Cheers,
Miau

Leave a Reply

Your email address will not be published. Required fields are marked *