You can install a WiFi driver on Ubuntu without an internet connection by first identifying your wireless chipset, downloading the correct driver package on another internet-connected computer, transferring it via USB, and then installing it using the terminal. This process is essential when a fresh Ubuntu install lacks the proprietary driver for your specific wireless hardware, leaving you unable to connect to the internet to fetch it automatically.
What You'll Need
- A second computer (or smartphone) with an active internet connection.
- A USB flash drive (or external storage) to transfer files.
- Your Ubuntu computer, booted and ready.
- Basic familiarity with the terminal and commands like
cdandls.
Step-by-Step
- Identify Your Wireless Chipset. On the Ubuntu computer without internet, open a terminal (Ctrl+Alt+T). Run the command
lspci | grep -i networkorlsusbif your WiFi is a USB dongle. Look for the chipset manufacturer (e.g., Broadcom, Realtek, Intel, Qualcomm Atheros). Note the specific model number if visible (e.g., BCM4313, RTL8821CE). - Find and Download the Driver Package. On the internet-connected computer, search for the driver. For common Broadcom chips, the package is often
bcmwl-kernel-source. For many Realtek chips, it may bertl8821ce-dkmsor similar. The best source is the official Ubuntu package repository. Go topackages.ubuntu.com, search for the likely package name, select your exact Ubuntu version (e.g., 22.04 Jammy), and under "Download" click the link matching your system architecture (usually amd64). This downloads a.debfile. Note: Many drivers have dependencies—other.debpackages they require. The package page lists them under "Depends." You must download these dependency packages as well from the same site. - Transfer the Packages. Copy all downloaded
.debfiles to your USB drive. Safely eject it and connect it to the offline Ubuntu computer. Mount the USB drive (it usually appears automatically). Open the terminal, navigate to the USB mount point, often/media/<username>/<drive_name>. Usecd /media/<username>/<drive_name>to change directory there. Verify the files are present withls *.deb. - Install the Driver and Dependencies. Install the packages using the
dpkgcommand. The correct order is to install dependencies first, then the main driver. Use:sudo dpkg -i package_name1.deb package_name2.deb. If you get dependency errors, you can try to force-install all packages in the directory at once:sudo dpkg -i *.deb. Ifdpkgreports unmet dependencies, you must find and transfer those missing packages. After installation, update the system's module list:sudo modprobe -r <old_module>(if applicable) andsudo modprobe <new_module>. Often, a reboot is required:sudo reboot. - Enable the WiFi. After rebooting, click the network icon in the system tray. Available WiFi networks should now appear. Select your network and enter the password to connect.
Common Mistakes
Downloading the wrong package version for your Ubuntu release is the most frequent error. Installing a package meant for Ubuntu 20.04 on 22.04 will likely fail. Not downloading dependency packages leads to installation failures. Another mistake is not identifying the chipset correctly; assuming it's a Broadcom driver when it's actually a Realtek chip will waste time. Finally, attempting to install from a source tarball (.tar.gz) without the necessary build tools (gcc, make, kernel headers) on the offline system is very complex and not recommended for beginners.
Tips
If you have an Android smartphone with internet, you can use USB tethering to provide a temporary wired internet connection to the Ubuntu PC. Enable "USB tethering" in your phone's network settings, connect via USB, and Ubuntu will often recognize it as an Ethernet connection, allowing you to install drivers normally via sudo apt install <driver-package>. This bypasses the entire offline process. Always check the "Additional Drivers" tool (search in the application menu) first, as it may list proprietary drivers that are already present but not activated. For laptops with a physical hardware switch or function key (e.g., Fn + F2) for WiFi, ensure it is turned on.
Troubleshooting
If no networks appear after installation, run iwconfig in the terminal. If the wireless interface (like wlp2s0) is not listed, the driver may not be loaded. Check with lsmod | grep <driver_keyword> (e.g., lsmod | grep wl for Broadcom). If nothing appears, manually load the kernel module: sudo modprobe <module_name>. If you get "modprobe: FATAL: Module <name> not found," the driver installation failed. Re-examine the dpkg error messages. Use sudo dmesg | grep -i error to see kernel-level errors related to WiFi. If you have a dual-boot system with Windows, ensure Fast Startup is turned off in Windows, as it can lock the wireless hardware, making it unavailable to Ubuntu. As a last resort, if you downloaded the wrong driver, purge it with sudo dpkg -r <package_name> and start the identification process again.
Frequently Asked Questions
How do I know if I need a proprietary WiFi driver?
If your WiFi adapter is not detected at all, or you see networks but cannot connect, you likely need a proprietary driver. Open "Additional Drivers" to see if any are suggested.
Can I use my phone to get the driver files directly?
Yes. Download the .deb files on your phone's browser, connect the phone to the Ubuntu PC via USB, set the USB connection to "File Transfer" mode, and copy the files from your phone's download folder to the Ubuntu home directory.
What if dpkg says dependencies are not satisfied?
You must obtain those specific missing dependency .deb packages from packages.ubuntu.com, transfer them, and install them alongside the driver package. Install multiple packages in one command: sudo dpkg -i dep1.deb dep2.deb driver.deb.
Is there a general driver that works for all WiFi cards?
No. While many Intel and some Atheros chips use open-source drivers included in Ubuntu, Broadcom and many newer Realtek/MediaTek chips require specific proprietary drivers.
What does DKMS mean in a package name?
DKMS (Dynamic Kernel Module Support) allows the driver to be automatically recompiled when you update your Linux kernel. This is beneficial for long-term use. Always prefer a DKMS driver if available for your chipset.
I have an Ethernet port. Can I use that instead?
Absolutely. If you have a wired Ethernet connection available, connect it and Ubuntu will use it. You can then install the WiFi driver normally using sudo apt install <package-name> without any file transfers.