NetworkManager Autoconnect to Wifi
Mar 05, 24Most of my machines use wifi to connect to the network, and several I run headless. After the initial install, they refuse to connect to wifi unless I log in with the gui. If I use the gui to log in, they connect on login, but if not, they don’t, so I can’t reach them with SSH. I had to put a monitor and keyboard on them and then use the terminal to delete the connection and then reinitialize it. After that, on reboot, these machines connect automatically.
Show the connections networkmanager has stored:
nmcli con show
Delete the connection:
nmcli connection delete 'connection'
Reinitialize the connection:
nmcli device wifi connect ssid password password