For some reasons, I still use Ubuntu 16.04 LTS. I’m not attached to it, and neither I get myself into the arguments related to Windows vs Linux.
To be honest, I don’t have much time to try the new OS(s). I miss the old days when I could test multiple distros of Linux in a day and still feel the hunger of trying more. Those were the days.
Anyway, I chose Ubuntu as my distro for the sake of stability.
You might be wondering why am I telling these crap about my life and the reason I use Ubuntu. Well, keep wondering because even I don’t know.
Coming to the important part – fixing the problem.
What can you do if the Network Manager suddenly starts to show something like “Wi-Fi disabled by hardware switch“, and when you press the F12 key hoping that it would fix the problem when it ends up disappointing you?
Answer – If the GUI can’t, the CLI will.
When I faced this problem, I started with –
$ sudo service network-manager restart
and it didn’t work.
The good thing – I was aware of `rfkill
`. It’s a command-line tool for enabling and disabling the goddamn wireless devices.
Doing $ rfkill list all
gave me the status of the wireless devices, something similar to –
1: phy0: Wireless LAN Soft blocked: yes Hard blocked: no
I don’t remember if the device was hard blocked or soft blocked.
Below is the list of commands I checked in order to see if they worked –
$ rkfill unblock wifi
- didn’t work
- Reason – I don’t know why.
$ rfkill unblock all
- didn’t work
- Reason – I don’t know why.
$ sudo rfkill unblock wifi
- didn’t work
- Reason – I don’t know why.
$ sudo rfkill unblock all && sudo service network-manager restart
- worked
- Reason – I don’t know how.
That’s it. It took only a minute to fix because I was aware of the rfkill
command.
Hope this helps!