Wi-Fi Not Working in Linux? Here’s How to Fix it

Linux Wifi Not Working Feature

One of the big challenges that users tend to face with Linux is Wi-Fi. Wi-Fi drivers are often not included in the kernel, and as a result, there are many issues getting non-Intel Wi-Fi modules to work well under Linux. Here we cover what happens when Wi-Fi isn’t working on Linux and how to fix it.

Hardware vs. Software Wi-Fi Issues

A Wi-Fi connection issue can be either a hardware or software issue. Hardware issues are relatively easy to diagnose – all you have to do is to open the terminal and enter the following command:

Linux Wifi Not Working Ping Localhost

This is a simple way to check if your physical hardware is working. localhost works as an address to check the circuitry for your NIC. If this isn’t working, you may need to have some work done on the hardware, whether by yourself or from someone else.

If that ping comes back clean or you don’t even see your Wi-Fi card, you likely have a software issue.

Install Drivers from Ubuntu ISO

If your distro isn’t detecting your Wi-Fi network at all, or if you’re getting errors, then you can try installing or reinstalling the Wi-Fi drivers from the Ubuntu ISO file. First, you need to download the Ubuntu ISO corresponding to your Ubuntu version. (Presumably, you need to download it on a different device or download it using your Ethernet connection on Ubuntu.)

Place the Ubuntu ISO into the Home directory on Ubuntu. Then in the Terminal, enter the following sequence of commands to mount the Ubuntu ISO to a virtual drive:

Go to “Software & Updates” from the dashboard, then in the new window, check the “CDrom with [your distro name and version] box” and enter your password when requested.

Click the “Additional Drivers” tab, then select the “Wireless Network Adapter” option and click “Apply Changes.”

Issue One: Device Not Detected

If the wireless device is not detected by Ubuntu (or any distro for that matter), then you will need to access the Terminal and type the following command:

if you use a plug-in USB wireless card/dongle and

Linux Wifi Not Working Lsusb

if you have an internal wireless card.

If the response from these commands comes back with an output similar to the screenshot below, then you are in luck: Ubuntu can find the card. It is usually identified by “Network Controller” or “Ethernet Controller.”

In the past, many Linux distributions have had difficulty finding the wireless card. Thankfully, support has gotten much better, so this is now a rare instance.

Additional Commands

You can also use the following command to test if the machine can see the wireless device; users may need to install lshw on their machine first.

Linux Wifi Not Working Lshw

The output should resemble something similar to this:

If this is the case, and the system finds the wireless card, you can proceed to installing the driver/module as described below.

Issue Two: Driver Module Missing

Following on from the successful lsusb and lspci commands, providing your Linux distro can see the wireless card, you can assume that the firmware is working, just that the system has no idea what to do with the card. This is where drivers or modules are needed.

Go back to the terminal and type the following command:

You will see a list of modules that are used. In order to activate your module, type the following command where “modulename” is the name of your chipset.

For example, if your wireless chipset is “RT2870,” it would be as follows:

Linux Wifi Not Working Modprobe

After this, run the lsmod command again to see if it has loaded correctly.

Load Module Automatically at Boot

It is a rare occasion, but sometimes the module will not persist from boot. In this case, you can force it to load permanently. Enter the command below into the Terminal:

The nano text editor will open. Add your module name at the bottom and save the file. You will need to reboot and check to see if the wireless card can now see networks to enable you to connect as normal.

If you get stuck, then repeat the process. Thankfully, Ubuntu has some useful help pages in its online documentation that you can also read through. Additionally, you can use the built-in help within the terminal by entering:

Issue Three: DNS

It is rare that the DNS will be an issue; however, it is worth investigating should you still have connection issues. From the Terminal, type the following command to assess where the DNS is coming from:

This will show you the LAN address of the router. If it doesn’t work, you may have to change “wlan1” to whatever your wireless uses. The following command can also be used to grab the designation:

Once you have this information, your next method is to ping your router’s LAN address. If this works, try to ping Google’s DNS servers:

With these results, you can establish where the DNS issue is. If all devices within your home or office are giving page load errors, then change the router DNS to Google or Open DNS servers. You’ll have to consult your router manufacturer for how to do this, but it is generally done within the admin pages, most commonly by logging onto 192.168.0.1 or similar.

If your DNS issue is Ubuntu only, then follow these steps by using the Network Manager GUI:

  • Right click on Network Manager.
  • Edit Connections.
  • Select the Wi-Fi connection in question.
  • Select IPv4 Settings.
  • Change Method to DHCP Addresses Only.
  • Add 8.8.8.8, 8.8.4.4 into the DNS server’s box. Remember the comma separating the IPs and don’t leave spaces.
  • Save, then Close.

As a final step, either restart your machine or restart the Network Manager from the Terminal:

Issue Four: No Network Manager

Let’s say you have removed the Network Manager or uninstalled it by accident. This is a really troublesome situation: you have no Internet and no Network Manager, but there are things you can do.

Assuming the package is still within your cache, you can go to the Terminal and enter:

If you have removed this cache, then you can use an Ethernet cable to connect by plugging this into your Ethernet port and running the above command again.

As a final step, if none of the above works, you will need to edit your configuration file. I selected gedit as the text editor, but you can use your preferred choice and amend the command.

Amend it to read as follows:

Then you can restart the interface by entering the below code:

Further reading of the Linux Wireless subsystem can be found on the kernel.org wiki.

With your Wi-Fi now up and running, why not celebrate by looking at the best ways to play Windows games on Linux? Or, if you don’t know all the ways you can rename files in Linux, then check out our guide on it.

Related:

John Perkins John Perkins

John is a young technical professional with a passion for educating users on the best ways to use their technology. He holds technical certifications covering topics ranging from computer hardware to cybersecurity to Linux system administration.

16 comments

  1. I tried Ubuntu on two different PC’s one was certified by Ubuntu to work. Neither has WiFi issues when installing, but upon first boot and logging in neither could recognize the WiFi card. I can understand why many first time average users give up on Linux desktop. I mean you would at least want a internet connection to allow for updates even if the driver isn’t the best or latest. Its also ridiculous to expect a newbie to use terminal commands to fix anything. I would rather tell someone to simply try another distro. or possibly find a release that appears to work with similar hardware to yours. Better yet, buy a Chromebook or a MacBook if you can afford it.

    1. Great to have a checklist for a persistent Linux problem. Shame it’s such a complicated process after all these years. This checklist is something which could be used to create a helper program that anyone could use. Containing the knowledge of the wisest. Usable by not just techies.

    2. I do agree John. This is my third attempt to use Ubuntu, on different machines and with different builds of Ubuntu on different WiFi networks. Only one has sort-of worked – but that was years ago. Sadly the instructions above have not helped. I’ll continue for another hour or so but am not feeling confident. (The build recognises WifI, lets me type a password, doesn’t give an error message but just ask for the password again, and again and again. I’ve tried several ways to save it).

      I do have to wonder how many others have tried and given up with Ubuntu because of what seems to be a common enough error.

      Very frustrating and very disappointing.

  2. Really, reading all this just go get on the web makes you wonder if Linux is thé place to be… Which distro would be better suitable to make my connection work without all that mumbo jumbo? Considering I’m a dummie user? My laptop is a simple HP 15 which runs on Win10 home. I want to get rid of that. Thank you!

    1. Ubuntu is still a good distro for beginner. You can try out a Live USB first to see if the Wi-Fi (and other hardware) work fine on your computer. Most of the time, it will be fine. It is not often to have a Wi-Fi issue in Ubuntu.

      1. i have installed Ubuntu and can connect to wifi but while i am browsing the wed it shows internet connection failed and never loads the page. it is frustrating but if i my connection is wired it works fast can you please help me please please please please help

  3. Any advice on how to tell if the hardware is broken, or breaking? None of the steps above seem to cover that, and I’m having trouble finding info on that.

  4. Mike

    Thanks for your informative post. I have just spent 3+hrs pottering around with linux terminal as you suggest. Unfortunately my computer is still unable to connect (via a Broadcom driver) to the internet. Things seem to fail completely around finding / recognising the driver.

    Is there somewhere where we can download the correct driver for linux and then put it into the correct folder? Which?

  5. I’m fairly new to linux, but came up in DOS so not afraid of cli. My issue is related to Ubuntu Studio 20.01LTS, and as such most of this article doesn’t work. when i ran the:
    sudo lshw -C network command, it answered with:

    *-usb:1 DISABLED
    description: Ethernet interface
    product: Dell Wireless 5630 (EVDO-HSPA) Mobile Broadband Mini-Card
    vendor: Foxconn
    physical id: 6
    bus info: usb@1:1.6
    logical name: wwan0
    version: 0.02
    serial: 5a:46:53:93:68:01
    capabilities: usb-2.00 ethernet physical
    configuration: broadcast=yes driver=qmi_wwan driverversion=22-Aug-2005 firmware=WWAN/QMI device link=no maxpower=500mA multicast=yes speed=480Mbit/s
    *-network
    description: Ethernet interface
    product: NetXtreme BCM5761 Gigabit Ethernet PCIe
    vendor: Broadcom Inc. and subsidiaries
    physical id: 0
    bus info: pci@0000:09:00.0
    logical name: enp9s0
    version: 10
    serial: d0:67:e5:49:85:b7
    size: 100Mbit/s
    capacity: 1Gbit/s
    width: 64 bits
    clock: 33MHz
    capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
    configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 duplex=full firmware=5761-v3.78 ip=192.168.1.9 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
    resources: irq:34 memory:e2010000-e201ffff memory:e2000000-e200ffff.
    As you can see the device is disabled, but I can’t find how to enable it. Any and ALL assistance is very welcome. when I posted to the “Studio” help board< I haven't yet seen a reply. I'm curious if "Studio" even supports WiFi. Thanking you in advance.
    Truly,

    Bill

  6. Hi gents
    I wonder I can have a wireless network on Linux Lite (Ubuntu 20.4LTS).My acer machine is dual booted win 10 home (x86) and Linux (x64)
    On Linux I have a wired network to internet but not wireless.On my win there is a normal wifi .Adapters interfaces etc .Cannot understand why on linux not working wifi
    After some googling and some terminal commands like lspci lshw c-network,lsusb or iwconfig I discovered that I don t have any wifi or wireless stuffs.
    Sorry I m not a techie.I downloaded a wireless driver from acers site .But don t know what do after this step.
    Thanks in advance .

  7. Hi I am new to Linux and in process of Learning.
    i have tried multiple things and still can’t see my Wifi

    It doesnt show up wireless connection. Only able to connect through Wired

  8. Hey, guys! I’m also a Linux newbie and was struggling with wifi on my Ubuntu 20.04 distro. First I couldn’t see the wireless option anywhere and after today’s upgrade I couldn’t connect to my network with no error message, just asking me again and again for my password (after I decided to forget the pw and connect manually). I did what I did last time to see the wireless list of connections and it worked again although it’d never been perfect coz I experienced drops from time to time while other devices ran perfectly fine. SOLUTION for me was to download b43. Follow instructions from here >>>
    https://ubuntuforums.org/showthread.php?t=2361632&page=2&highlight=b43.zip (wildmanne39 19/05/2017)

    I hope it will work at least for some.

  9. You see a list of modules that are used. In order to activate your module, type the following command where “modulename” is the name of your chipset.

    sudo modprobe modulename
    For example, if your wireless chipset is “RT2870,” it would be as follows:

    sudo modprobe rt2800usb
    After this, run the lsmod command again to see if it has loaded correctly.

    None of these results say the name of your “chipset”
    the only important piece of info, presumably, which you can from the previous command, is the name of the chipset, so you can proceed to the next step, and this seems to be just left out, or apparently should be common sense from the user?

    so yeah, after typing “sudo lsmod” I see a list of modules, but then there seems to just be a gap in the instructions

    After getting linux up its taken like 3 hours to not learn how to even connect to wifi. this is so lame

    1. Gid makes a valid point. There is no instruction on what to do next. In Linux Mint I found a module bcma that might be the Broadcom wifi, and I did the modprobe bcma, but nothing happened. So I booted Ubuntu (where the wireless worked and on which Mint is based) and did the same commands, and this time the lsmod listed bcma with some parameters, as in
      bcma 65536 3 b43,brcmsmac
      which were not there on Mint. So the question becomes how do I get lsmod to have those parameters?

  10. Wow, Windows has all the wi-fi issues, not Linux! Out of a dozen or so distros I’ve used, none have had wi-fi or networking in general, problems. Networking may be Linux’s biggest strength. Windows network stack was a roulette wheel for years, never knew if an update would flake out wi-fi or not. Seems OK for the last year or so although ethernet is still clunky.

    After years of Hope-Springs-Eternal with Windows, the speed Linux connects a new install to wi-fi was so good, it seemed suspicious at first. Never had to do anything beyond entering pwds; no CLI stuff at all. Everything from 10 year old cards to brand new ones. All three main Linux branches. Our current router is a Netgear R7800 with third party firmware, since Netgear’s firmware is beyond awful, unstable data collecting junk. Our R7000, third party firmware, worked fine, also.

    The only distros with netorking issues were two headless server installs that were bare bones, add all your own features and I honestly didn’t know how to deal with them at the time. Networking was the least of my issues; nothing worked! Minimal Ububtu 20 is running our home server now; I despise gnome but networking, wired and wireless presented no problems at set up or after. No wi-fi drivers to install. Was fine with Ubuntu 18, too.

    Good advice here for those with problems, although I’m not sure why they would occur. My Linux test laptop is 11 years old, the server has a Xeon processor; wide gap between them. Routers can make a huge difference; rebooting them, connect first with ethernet, etc. Some just won’t work correctly ever.

  11. I guess my experience is very different from others posting here. I haven’t had a problem with WIFI since WICD was common on installations instead of network manager. The only time I had that had an issue since WICD was a Broadcom wireless card as the driver is not open source which Debian will not allow on the installation media, but you can download it and add it yourself. I put my laptop on a wire and downloaded and installed the Broadcom driver and that was it to get it working. I even used Frisbee on a Puppy derivative without a problem. I was a dedicated distro-hopper for years (though no longer) and never experienced problems.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.