Note: This how-to assumes that user has a system where internet was working properly until something went wrong.
Sometimes you may need to boot in to console mode or recovery mode instead of Plasma desktop in order to do maintenance or repair.
You may find that wifi does not work in these modes.
To connect to wifi from command line you use the nmcli
command. Example:
To determine what device to connect run this command:
$ nmcli dev status
This will list any available network devices. In this example we know that we are wifi but not wifi-p2p and the command lists wifi device as wlp4s0, so to connect:
$ nmcli --ask dev con wlp4s0
This should ask for your wifi password and then connect your wifi.
Now you can do any maintenance or repairs that require internet access.
If you are using ethernet connection, to connect is basically the same:
$ nmcli dev status
If your ethernet device is listed as an example as elp4s0:
$ nmcli dev con elp4s0
The --ask
option is not normally needed, as your system already has permission for this.
Wifi permissions are normally separate and unique from system permissions.
-