1. List Available Networks: Use the nmcli command to list available Wi-Fi networks.
nmcli dev wifi list
  1. Connect to a Network: Use the nmcli command to connect to a specific network. Replace <SSID> with the name of the Wi-Fi network and <password> with the Wi-Fi password.
nmcli dev wifi connect <SSID> password <password>
  1. Verify Connection: Check the connection status to ensure you are connected.
nmcli dev status

Additional Information

  • Listing All Network Interfaces: You can list all network interfaces and their statuses using:
nmcli device
  • Disconnecting from a Network: If you need to disconnect from a Wi-Fi network, use:
nmcli dev disconnect iface wlan0

Replace wlan0 with the appropriate interface name if it is different.

  • More nmcli Options: The nmcli command offers a wide range of options and functionalities. You can explore more by checking the manual:
man nmcli
man nmcli-examples