- Update system
sudo apt update
sudo apt upgrade
- Install NetworkManager
sudo apt install network-manager
# Remove these packages as suggested here:
# https://raspberrypi.stackexchange.com/a/73816
# Otherwise the wifi device appears as unavailable to nmcli.
sudo apt purge openresolv dhcpcd5
- Reboot
sudo reboot
- 
nmcli device wifilists available networks.
- 
nmcli device wifi --helpto list available commands/options.
- 
nmcli device wifi connect <SSID> password <Secrete>to connect to a WiFi network.
Please add
ifupdownto theapt purge