With a headless server Ubuntu makes it easy to manage all network connections via network manager (nmtui interface). Configuring a wireless LAN adapter requires more configuration than a wired LAN as an SSID / key must be specified.
List Saved Wifi Connections:
1 | nmcli c |
List available Wifi Hotspots:
1 | nmcli d wifi list |
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.
Using Network Manager CLI to connect to a specific Wifi network:
1 2 3 4 | ##disconnect nmcli d disconnect <WifiInterface> ##connect nmcli d connect <WifiInterface> |