befree/doc/nmcli_command.org

1.6 KiB

nmcli command

`nmcli` is a terminal functionality to use network manager and report network status.

Some of the common uses on connections are1:

  • create
  • display
  • edit
  • delete
  • activate
  • deactivate

To check the status of the network use:

  nmcli general
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
connected full enabled enabled missing disabled

To check the connections and devices use:

  nmcli connection show
  nmcli device show

List and connect to wifi

First, list the devices that area available for wifi connection:

   nmcli dev wifi list

This will output some information about wifi in a table:

IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY

From here you could use the "BSSID" or "SSID" to connect to wifi

Connect to a wifi:

Use the following command and include the wifi BSSID:

  nmcli dev wifi connect A4:D4:B2:6A:D9:77

In case you need to include the password for wifi, use:

   nmcli --ask dev wifi connect network-ssid

You could also use the SSID (name of wifi connection), e.g.:

  nmcli dev wifi connect wifi_name_here

Footnotes


1

Check the manual on the terminal: `info nmcli` or here