Prechecks to diagnose Internet Connectivity issue
Before you move forward with troubleshooting, it is essential to check a few things. These are:
- Does your network has internet access? Check your internet connection on your mobile phone for a quick answer.
- Are you using one of the best Linux Compatible Network Adapters? If your network adapter isn’t compatible with your Linux distro version, it won’t work.
- If you are connected to the internet via a wired connection, are your cables connected correctly? Check both ends of the wire for any loose connection.
- Some laptops have an internet connectivity toggle that lets you turn your Wifi on or off. Make sure it is turned on.
- Go to your system’s settings and check whether the Wifi switch is on or not
- Check whether the Airplane mode is on or off. Turn it off if you find it turned on.
Solution 1: Hardware Issues Vs. Software Issues
Next, you have to determine whether your internet problem is a hardware Wifi issue or a software connectivity issue. A Wifi problem can be either of the two. However, hardware connectivity issues are relatively easy to troubleshoot. All you need to do is open the Linux command terminal and type in the following command:
This is a very simple way to determine whether your hardware is working fine or having some problem. Localhost address checks the circuitry for your Network Interface Controller (NIC). You may have to take your system for repair or get it fixed yourself in case of a problem.
If the ping returns no hardware issue, but you don’t see your wireless card. Read on to see what you can do to fix the problem.
Solution 2: Re-InstallRe-Install, the Drivers from the original ISO
Is your Linux distro not detecting your internet drivers at all? Try re-installingre-installing the drivers with the help of its ISO. If you had a fresh install, you must have this ISO image somewhere. Common connectivity errors can be easily taken care of by re-installingre-installing the drivers from the original ISO file.
Step 1: To do this, go to your operating system’s corresponding version page online. For instance, if you are on Ubuntu, you can download its latest Ubuntu 20.04.2.0 LTS version from here, on another device, or use an Ethernet connection on Linux. Copy it to your Home directory.
Step 2: Open the Linux command terminal and enter the following commands to mount the image just like a CD Rom manually.
cd ~
sudo mount -o loop ubuntu-* /media/cdrom
Step 3: In Unity Dash, look up Software & Updates
Step 4: In the Ubuntu Software tab, check the “CDrom with Ubuntu…” option and enter “Close.”
Step 5: Finally, go to the Additional Drivers tab in “Software & Updates,” select your propriety driver and hit “Apply Changes.”
Sometimes, Ubuntu may not show additional drivers. In that case, you have to download the propriety drivers from the internet. Sometimes, despite the additional drivers, Wifi still won’t work. In that case, refer to the following method.
Solution 3: Solve No Wifi in Ubuntu Issue with the help of Broadcom Wireless Adapters
Step 1: As this method is applicable only on Broadcom wireless adapters (Broadcom 43 series), ensure you are not using any other wifi adapter by typing this command in the terminal:
You will see a wireless adapter that starts with BCM43. Otherwise, don’t continue with this method.
Step 2: Next, remove any Broadcom adapter drivers you may already have on your system by using the following command:
Step 3: Connect to the internet via an Ethernet cable and use this command to install Broadcom drivers automatically
In case you don’t have Ethernet, you will have to install the drivers manually on another Linux system and then copy and paste the drivers from there to your problematic system.
To do this, first check which Ubuntu version you are on by typing the following command in the terminal:
Next, download the wireless driver from this link for your corresponding Ubuntu version. It will be a DEB file. Transfer it to your system with no Wifi driver using a USB.
Now you can install the package by double-clicking on it or by using the following commands:
sudo dpkg -i firmware-b43-installer_*
Solution 4: Can your Distro detect Wireless Device?
Sometimes, your Linux distro (Ubuntu or any other) is unable to detect your wireless device. If that’s the case:
Step 1: Access your Linux command terminal and type in the following command:
(If you use a USB wireless dongle)
If you use an internal wireless card, use the following command instead:
You can also use lshw to find out whether your machine has a wireless device. However, you have to install the lshw tool on your machine to do this first. Here’s the command to use:
Below is what you should be able to see (or something similar)
description: Wireless interface
product: PRO/Wireless 3945ABG Network Connection
vendor: Intel Corporation
If your Operating System can find the card and you see a response in positive with your network card identified, you are in luck. Ubuntu usually identifies it by “Ethernet or Network Controller”.
A positive response means your Linux distribution is able to connect to the card, which means the firmware is working just fine. The problem is with your system, which has no idea what to do with it. And that’s where drivers come into play. You need to install the driver modules.
To do this, go back to the command terminal and enter the following command
This command will show you a list of modules. To activate yours, enter the following command. Replace “modulename with the name of your machine’s wireless chipset
For instance, if your chipset is RT2870, your command should be:
Pro Tip: Google your chipset name along with Linux, i.e., “RT2870 Linux,” to find out whether a particular Linux distro supports your hardware or not.
Re-run the lsmod command again in the terminal to make sure the module has loaded successfully.
Solution 5: Load Wifi Module on Boot Automatically
On rare occasions, the Wifi module will not load on boot. In that scenario, you can force the module to load permanently. Here’s how you can do it.
Step 1: Type in the following command
This command will open the nano text editor. Enter your module name and save the file. Now, reboot your system and see if the wireless card can identify the network to connect to? You can also repeat the same process if you get stuck.
Solution 6: Change DNS to Google or OpenDNS
DNS issues are not very common but can cause trouble when you least suspect them. Therefore, it’s a good idea to check your system’s DNS address for any issues. Use the following command to check where your system’s DNS is coming from:
This command will show you the LAN address your router is using. If this command doesn’t work, change wlan1 to wlan2,wlan3, or whatever your wireless is using. You can do so by using the “IP as” command in the terminal.
Next, you need to ping your router’s LAN and Google (or OpenDNS) DNS servers. This is done with the help of the ping command:
(in case of Google)
(in case of OpenDNS)
With this information, you can easily determine whether the problem is DNS-related or not. If all devices within your network are giving load errors, then change the DNS of the router to OpenDNS or Google’s DNS servers. It is usually done with the router’s admin page by logging into 192.168.1.1 and admin: admin or something similar. In case the issue is specific to one machine only. You can change its DNS settings by going into the Network Manager and edit IPv4 settings.
Finally, restart your machine to cement your settings.
Final Thoughts
Troubleshooting Wifi issues in Linux can be tricky. There can be a hundred different reasons for a problem. Hopefully, our solutions will provide you some good places to start troubleshooting your problem. Besides, Linux has gotten mainstream. You can find a solution to almost any Wifi problem these days. Various distros like Ubuntu also have excellent online documentation available that you can consult. Good luck!