-
-
Save micrypt/1207324 to your computer and use it in GitHub Desktop.
| su root | |
| # Don't you hate when you need to root to fix dumb issues? | |
| service network-manager stop | |
| rm /var/lib/NetworkManager/NetworkManager.state | |
| service network-manager start | |
| reboot -h now |
11 years later still saves lives
11 years later ... well done ubuntu!
Still works in 2023!
thanks to kanhaiya-2000's comment this still works on Ubuntu 22.04 in 2023!
still works! I wonder if it will work in another 12 years
still works! I wonder if it will work in another 12 years
believe me it'll
This didn't help rather installing the 'netplan.io' package fixed this issue (Ubuntu 22.04.3 LTS).
How did I get into this scenario?
Well, I tried 'apt auto-remove python3', and all of a sudden my machine rebooted and landed on the tty1 prompt, couldn't start ubuntu-desktop!
How did I get back to ubuntu-desktop?
Ran 'sudo apt install --reinstall ubuntu-desktop' and got back the GUI. But then the ethernet was not working, 'lshw -c network' showed my ethernet interface 'enp43s0' was unmanaged!
sudo apt install netplan.io
sudo apt install network-manager
sudo cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=truein my case, no need to delete NetworkManager.state
I cannot believe this thing still works in 2024...
It is 2026, and the broken NetworkManager.state file is still an issue! After removing that file fixed everything, I figured out that I could have solved the problem without becoming root using:
$ nmcli net onBut, there's no way for anyone to ever figure that out as NetworkManager never mentions the NET setting!
- In the Gnome Settings GUI, the Wi-Fi panel simply said, "No Wi-Fi Adapter Found"
- From the command line,
nmcli dev wififailed to scan for stations but gave no error messages. nmcli,nmcli dev, andnmcli generalall showed that wlan0 was unmanaged which was not true and a red herring. The more important fact was that "NET" was disabled and so being managed or not didn't matter and could not be changed.- Trying
nmcli dev set wlan0 managed yesgave no error message even though it failed because NET was off. nmcli radiosaid that WIFI was disabled, which was true, but irrelevant since it cannot be changed when NET is off.- Trying
nmcli radio wifi ongave no error message even though it, too, failed to work.
Thank goodness I ran across this gist as I was tearing my hair out.
11 Years later, your contribution is still saving lives.
It worked for me on Ubuntu 22.04.