How to connect to internet in console mode or recovery mode

Tags: #<Tag:0x00007fe459c6c970> #<Tag:0x00007fe459c6c830> #<Tag:0x00007fe459c6c6c8>

Note: This How To article assumes that user has a system where internet was working properly until something went wrong. It is rare but possible that things get broken deeper in the system and other system functions would need to be enabled from terminal for internet to work again. If you have such an issue please ask us in support forum. The following has worked for and been tested numerous times by the author.

Note-2: If any user has questions about the following please ask in support forum.

Sometimes when things don’t work as they should a user may need to boot in to console mode or recovery mode instead of Plasma desktop in order to do maintenance or repair.


Then user 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 my instance I know that I am wifi but not wifi-p2p and the command lists my 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 user can do any maintenance or repairs that require internet access.

If you are using ethernet connection and for some reason this is not working to connect an ethernet connection is basically the same:

$ nmcli dev status

If your ethernet device is listed as say elp4s0:

$ nmcli dev con elp4s0

The --ask option is not normally needed for that as your system already has permission for this. Wifi permissions are normally separate and unique from system permissions.

General info about nmcli command:

Obviously one can find much more about the nmcli command simply by doing an internet search. There is much one can do with this command if needed. Use internet search or read man pages. To access man pages:

$ man nmcli

$ man nmcli-example

There are other man pages in OM Lx for NetworkManager, NetworkManager.conf, nm-settings, and nm-online. There is much one can do with this command if one chooses to do so.