Skip to content

Instantly share code, notes, and snippets.

@micrypt
Created September 9, 2011 20:59
Show Gist options
  • Select an option

  • Save micrypt/1207324 to your computer and use it in GitHub Desktop.

Select an option

Save micrypt/1207324 to your computer and use it in GitHub Desktop.
Fix silly "Networking Disabled" issue (Ubuntu 10.04)
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
@sebgiles

sebgiles commented Mar 6, 2019

Copy link
Copy Markdown

8 years later, ubuntu 18.04, this is still a thing.
thank you!

@ronn

ronn commented Oct 31, 2019

Copy link
Copy Markdown

Man, I was struggling with this for about 3 hours.
Thaaaaaank yoooouuuu!!!

@senaerturk

Copy link
Copy Markdown

Thank you. There are lots of unnecessary solutions on other platforms.

@VennilaPugazhenthi

Copy link
Copy Markdown

Thank you soo much!! It worked!

@faysalmahamud

Copy link
Copy Markdown

This tricks still working even though ubuntu 18.04!!! Thank you so much

@Sarath3395

Copy link
Copy Markdown

9 years old but still it worked for me thanks a lot!!!

@GauriShankarBadola

Copy link
Copy Markdown

Ubuntu 20 and nothing worked except this one. GOD bless you.

@djain1992

Copy link
Copy Markdown

This is life saver. Thanks a lot.

@Slyracoon23

Slyracoon23 commented Sep 6, 2020

Copy link
Copy Markdown

I am on Ubuntu 20 and all my wireless network adapters were disabled. This was the only thing that actually worked! Thank you so much!!!!

@kiyoshi-kuntech

Copy link
Copy Markdown

Ubuntu 18.04, and this solution worked perfectly. Thank you so much!.

@jsommr

jsommr commented Dec 10, 2020

Copy link
Copy Markdown

I've wasted hours on this, and your gist fixed it immediately. Thanks!

@derekelec

derekelec commented Jan 10, 2021

Copy link
Copy Markdown

This worked for me!

The only thing, is I keep having to do this almost everyday and its getting annoying. But I am not familiar with this stuff and am at a loss on how to trouble shoot it. Any suggestions?

@EliasRoybal

Copy link
Copy Markdown

Thank you so much!! I've been looking everywhere and this did it!

@7nine

7nine commented Jul 2, 2021

Copy link
Copy Markdown

jfc aaaaaand this still works for 20.04.

@dudeofea

Copy link
Copy Markdown

Ubuntu 18.04, helped fix "lshw / *network-DISABLED" issues after compiling ethernet driver

@carineong

Copy link
Copy Markdown

Thank you so much!! I have been struggling for it almost 3 hours. Btw, if you faced an authentication error in the first line, try using "sudo -i"

@ViAuto1

ViAuto1 commented Jun 9, 2022

Copy link
Copy Markdown

2022 still works, thank you man

@kanhaiya-2000

kanhaiya-2000 commented Jul 19, 2022

Copy link
Copy Markdown

Thanks! It still worked for ubuntu 22.04 ...

Just a small change:
service network-manager stop ---> service NetworkManager stop
service network-manager start ----> service NetworkManager start

@K-TheMartian

Copy link
Copy Markdown

ubuntu 18.04, unfortunately, didn't solve this for me :(
the best luck to all who see this.
Network is disabled under "lshw -c Network"

@kevnoutsawo

Copy link
Copy Markdown

11 Years later, your contribution is still saving lives.
It worked for me on Ubuntu 22.04.

@domsebalj

Copy link
Copy Markdown

11 years later still saves lives

@CharlesLi114

Copy link
Copy Markdown

11 years later ... well done ubuntu!

@dalgetty

Copy link
Copy Markdown

Still works in 2023!

@42oli

42oli commented Jul 24, 2023

Copy link
Copy Markdown

thanks to kanhaiya-2000's comment this still works on Ubuntu 22.04 in 2023!

@veziak

veziak commented Sep 7, 2023

Copy link
Copy Markdown

still works! I wonder if it will work in another 12 years

@ajtazer

ajtazer commented Nov 23, 2023

Copy link
Copy Markdown

still works! I wonder if it will work in another 12 years

believe me it'll

@pearleye

pearleye commented Dec 15, 2023

Copy link
Copy Markdown

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!

@skyer9

skyer9 commented Feb 15, 2024

Copy link
Copy Markdown
sudo apt install netplan.io
sudo apt install network-manager

sudo cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true

in my case, no need to delete NetworkManager.state

@TT702

TT702 commented Jun 12, 2024

Copy link
Copy Markdown

I cannot believe this thing still works in 2024...

@hackerb9

hackerb9 commented Jan 20, 2026

Copy link
Copy Markdown

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 on

But, 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 wifi failed to scan for stations but gave no error messages.
  • nmcli, nmcli dev, and nmcli general all 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 yes gave no error message even though it failed because NET was off.
  • nmcli radio said that WIFI was disabled, which was true, but irrelevant since it cannot be changed when NET is off.
  • Trying nmcli radio wifi on gave no error message even though it, too, failed to work.

Thank goodness I ran across this gist as I was tearing my hair out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment