Can't use internet because networkmanager has disappeared !! (Ubuntu 20.04 LTS)

I need help, and it is quite urgent. I had connections issues (my Wi-Fi connection kept disconnecting)

So I followed what a member of this community recommended, in a similar post written by a fellow member

I entered these commands in a shell

sudo apt-get purge network-manager
sudo apt-get update
sudo apt-get autoremove
sudo apt-get upgrade
sudo apt-get install network-manager
sudo apt install ubuntu-desktop

And now... I don't see any wifi parameters. I can't connect to the internet...

How can I fix this?

Here is what I get when i type sudo dmesg | grep wlo1

enter image description here

10

1 Answer

In the absense of Network Manager, I suggest that you use netplan. From the terminal, do:

ls /etc/netplan

Find out the name of the file. Make a backup as you will need it after reinstalling NM:

sudo mv /etc/netplan/<file_you_found>.yaml /etc/netplan/<file_you_found>.bak

Now, let’s create a new file:

sudo nano /etc/netplan/config.yaml

Write the file to read:

network: version: 2 renderer: networkd wifis: wlo1: dhcp4: yes dhcp6: yes access-points: "network_ssid_name": password: "**********"

Of course, substitute your details here. Note that the network name and password are enclosed in quotes “.

Netplan is very specific about spacing, indentation, etc., so proofread carefully twice. Save (Ctrrl+o followed by Enter) and exit nano (Ctrl+x followed by Enter).

Follow with:

sudo netplan generate
sudo netplan apply

Did you connect?

iwconfig
ping -c3 

It might take a reboot.

If you are connected, reinstall NM:

sudo apt update
sudo apt install –reinstall network-manager ubuntu-desktop

Reboot and tell us if there is any improvement. If so, I will edit this answer to revert netplan.

EDIT: Now that you are connected and have reinstalled Network Manager, we should revert the netplan file to again refer to NM.

Please do:

 ls /etc/netplan

I assume that the file you backed up is /etc/netplan/01-network-manager-all.bak

If so, first back up the file you just created above:

sudo mv /etc/netplan/config.yaml /etc/netplan/config.bak

And restore the previous file:

sudo mv /etc/netplan/01-network-manager-all.bak /etc/netplan/01-network-manager-all.yaml

Follow with:

sudo netplan generate
sudo netplan apply

You should be all set.

15

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like