Sep 8, 2017

WLAN management with linux: networkmanager CLI "nmcli"

Configuring WLAN settings with the graphical user interface network manager is really easy.
Nevertheless sometimes it is necessary to configure the WLAN settings via a terminal. And therefore you should use nmcli:

To get a list of all available networks use "nmcli d wifi list"
$ nmcli d wifi list
*  SSID                 MODUS  CHAN  RATE       SIGNAL  BARS  SICHERHEIT
*  Gastzugang           Infra  12    54 Mbit/s  72      ▂▄▆_  WPA2      
   Napoleon Gastzugang  Infra  36    54 Mbit/s  27      ▂___  WPA1 WPA2 
   Napoleon Gastzugang  Infra  1     54 Mbit/s  25      ▂___  WPA1 WPA2 
   Napoleon             Infra  1     54 Mbit/s  25      ▂___  WPA2      
   Napoleon             Infra  36    54 Mbit/s  25      ▂___  WPA2      
   WLAN-901974          Infra  6     54 Mbit/s  24      ▂___  WPA2      
   Z                    Infra  11    54 Mbit/s  22      ▂___  WPA2      
   me5gast              Infra  3     54 Mbit/s  19      ▂___  WPA2      
You can get all saved connection via "nmcli c"
$ nmcli c
NAME                       UUID                                  TYP              GERÄT 
Gastzugang                 41d0717a-c4bc-47a4-acf7-bfa66dfa5462  802-11-wireless  wlp3s0
Kabelnetzwerkverbindung 1  316621ce-f61c-3163-a655-826306a79690  802-3-ethernet   --     
To connect to a wlan network "nmcli d wifi connect password
# nmcli d wifi connect Gastzugang password mypassword
Fehler: Aktivierung der Verbindung ist gescheitert: (7) Geheimdaten waren erforderlich, wurden aber nicht angegeben.
or with the right credentials:
Gerät »wlp3s0« wurde erfolgreich mit »754b6e6a-6284-4cf3-9737-13dd66f85b8e« aktiviert.


No comments:

Post a Comment