• To see list of saved connections, use (<SavedWiFiConn>)
      nmcli c
    
  • To see list of available WiFi hotspots (<WiFiSSID>)
      nmcli d wifi list
    

    or:

      sudo iwlist <WifiInterface> scanning
    
  • To see list of interfaces (<WifiInterface>)
      ifconfig -a
    

    or

      ip link
    

Just change <WifiInterface><WiFiSSID><WiFiPassword> in the following commands to reflect your setup. If WiFi info already saved, easier way using <SavedWiFiConn> name of connection as it was saved in NetworkManager.

Ubuntu 16.04 and the following

##disconnect
nmcli d disconnect <WifiInterface>

##connect
nmcli d connect <WifiInterface>

Another way:

##disconnect
nmcli c down <SavedWiFiConn>

##connect
nmcli c up <SavedWiFiConn>

Ubuntu 15.10 & previous

##disconnect
nmcli d disconnect iface <WifiInterface>

##connect
nmcli d wifi connect <WiFiSSID> password <WiFiPassword> iface <WifiInterface>

Another way:

##disconnect:
nmcli c down id <SavedWiFiConn>

##connect:
nmcli c up id <SavedWiFiConn>

Tell to ask for password

If your password isn’t automatically recognized type this:

nmcli -a c up <SavedWiFiConn>

nmtui ncurses solution

Great interactive ncurses network manager option:

nmtui

If for some reason it is not installed, the Debian package is:

sudo apt install network-manager

Comes in the same package as nm-applet (the default top bar icon thing) and nm-cli, and is therefore widely available.

Screenshot:

By faiz

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *