Using the Network Manager CLI app to get information about your network connections is very simple. This allows a user to manage network connections without using a GUI. Linux users do not always use the desktop and use of the CLI is an important skill. So it is very good to be able to manage WIFI connections using CLI only. So here we go.
Use the nmcli c command to list all your current network connections.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli c NAME UUID TYPE DEVICE virbr0 2a30f961-ad78-4784-9d53-60291d069fc3 bridge virbr0 Wired connection 1 6ce9343c-44b3-3506-a334-35144563767c ethernet -- |
The nmcli d wifi command will list all available WIFI connections. This also shows information about the security of the connection, and signal strength.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli d wifi IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY -- Infra 6 65 Mbit/s 52 ▂▄__ -- Telstra3265763122 Infra 1 130 Mbit/s 42 ▂▄__ WPA2 TelstraD22F23 Infra 11 195 Mbit/s 39 ▂▄__ WPA2 TelstraE96AED Infra 11 195 Mbit/s 39 ▂▄__ WPA2 Telstra62FD Infra 6 195 Mbit/s 35 ▂▄__ WPA2 Telstra Air Infra 11 195 Mbit/s 35 ▂▄__ -- Fon WiFi Infra 11 195 Mbit/s 35 ▂▄__ -- Definitely not ASIO Infra 1 130 Mbit/s 32 ▂▄__ WPA2 Telstra Air Infra 6 130 Mbit/s 32 ▂▄__ -- Fon WiFi Infra 6 130 Mbit/s 32 ▂▄__ -- Telstra6C5A3A Infra 9 130 Mbit/s 32 ▂▄__ WPA2 Telstra Air Infra 9 130 Mbit/s 32 ▂▄__ -- Fon WiFi Infra 9 130 Mbit/s 32 ▂▄__ -- Fon WiFi Infra 13 130 Mbit/s 32 ▂▄__ -- HP-Print-C4-Officejet 4630 Infra 9 54 Mbit/s 29 ▂___ WPA2 Telstra962013 Infra 13 130 Mbit/s 29 ▂___ WPA2 Telstra Air Infra 13 130 Mbit/s 29 ▂___ -- |
To delete a connection, use this command.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli c delete "Wired connection 1" |
To connect to a wireless Access Point, use this simple command.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli d wifi connect AndroidAP1105 password etdy9179 |
If the passkey is mistyped, it will bring up a GUI dialog prompting for the correct passkey.
To bring up this connection if it is not done automatically, use this command.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli c up AndroidAP1105 |
To shut down the connection, use this command.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli c down AndroidAP1105 |
To get comprehensive information about all of your network devices, use this command.
4.4 Wed Apr 17 jason@Yog-Sothoth 0: $ nmcli device show |
That is how easy it is to manage network connections using the command line on Linux. This will make life easier for you if you wish to use the CLI more than the GUI and are still using Network Manager. There is nothing wrong with Network Manager and it is very powerful.