NetworkManager
Scanning and connecting through nmcli
Scanning
To scan for available networks:
$ nmcli device wifiConnecting
New network
To connect to a new network and create a profile for it:
$ nmcli device wifi connect "<SSID>" --askThe --ask flag lets nmcli ask for any necessary details, like a password.
Network with an existing profile
While it is possible to connect to a network with an existing profile just like to an old network, it is generally more convenient to run:
# nmcli connection up "<connection ID - usually the SSID>"Network profile modification
Network profile location
The network profiles are located in /etc/NetworkManager/system-connections/. The permissions on this folder are 700 for user and group root. Following changes to
MAC address randomisation
In section [wifi]:
(...)
[wifi]
cloned-mac-address=random
(...)