Ever walked into your house, turned on the light switch, and nothing happened—only to realize the main power was off?
Booted up the Linux machine and Wi-Fi wasn’t working!
Step 1: Check if the "Power Supply" (NetworkManager) is ON
NetworkManager is like house's electrical panel—it manages which appliances (Wi-Fi, Ethernet, etc.) get power (internet).
systemctl status NetworkManager
Output:
Active: inactive (dead)
NetworkManager.service: Job NetworkManager.service/start failed with result 'dependency'.
The main switch was off.
Turn the Power Back On
sudo systemctl restart NetworkManager
Now it showed:
Active: active (running)
Lights are back on! 💡 But wait…
Step 2: Check if the Devices Are Plugged In
Let’s see if the Wi-Fi adapter is even recognized (like checking if the lamp is plugged in).
ip link show
nmcli device
Looks good! The adapter was visible and marked connected, but internet wasn’t quite there yet…
Step 3: Check Device Connection
ip a | grep inet
A proper IP address (getting electricity at the socket). A quick:
ping -c 4 8.8.8.8
Returned successfully—so the raw connectivity was fine!
Step 4: DNS - the Culprit
aka, the Address Book Was Missing
Even though the connection was up, websites still weren’t loading.
Like having electricity, but the smart speaker doesn’t know how to play music—because the Wi-Fi password is gone, or here, the DNS resolver was missing.
Fix it by adding Google's DNS server:
sudo vi /etc/resolv.conf
nameserver 8.8.8.8
Step 5: Restart Network Services
Just like you'd reboot your Wi-Fi router when things get weird, restart the services:
sudo systemctl restart NetworkManager
sudo systemctl restart wpa_supplicant.service
🎉 And finally—it worked. Back online!
TL;DR:
- NetworkManager = Power switch
- WiFi Adapter = Device plugged in
- IP Address = Electricity flow
- Restarting services = Rebooting the system