Installing drivers on Linux depends on your hardware vendor and whether you need proprietary or open-source options. This guide will walk you through the exact steps for how to install drivers on linux, covering everything from graphics cards to Wi-Fi adapters. You don’t need to be a command-line expert to get your hardware working perfectly.
Understanding Linux Driver Basics
Before you start installing anything, it helps to know how Linux handles drivers differently than Windows or macOS. Most drivers are built directly into the Linux kernel, which is the core of the operating system. This means many devices work automatically when you plug them in.
Open-source drivers are included by default and are maintained by the community. Proprietary drivers, like those from NVIDIA or certain Wi-Fi chip makers, are closed-source and need manual installation. The method you choose depends on your hardware and your preference for open-source software.
Open-Source Vs Proprietary Drivers
Open-source drivers are usually more stable and receive updates through your system’s package manager. They may lack some advanced features, like full 3D acceleration for gaming. Proprietary drivers offer better performance for specific tasks but require you to follow vendor instructions carefully.
Most modern Linux distributions automatically detect and use the best available driver. You only need to intervene when the default driver doesn’t work or you want extra performance. Let’s look at the most common scenarios.
How To Install Drivers On Linux Using Your Package Manager
The easiest method for installing drivers on most Linux systems is through your distribution’s package manager. This approach is safe, automatic, and keeps your drivers updated with the rest of your system.
For Ubuntu And Debian-Based Systems
Ubuntu and its derivatives have a built-in tool called “Additional Drivers” that handles proprietary driver installation. You can find it in your system settings under “Software & Updates.” This tool scans your hardware and lists available proprietary drivers.
- Open “Software & Updates” from your application menu.
- Click on the “Additional Drivers” tab.
- Wait for the scan to complete. It will show your graphics card and other devices.
- Select the proprietary driver you want (usually the recommended one).
- Click “Apply Changes” and enter your password.
- Reboot your system to activate the driver.
If you prefer the command line, you can use the ubuntu-drivers tool. Open a terminal and run sudo ubuntu-drivers autoinstall. This command automatically installs the recommended drivers for your hardware.
For Fedora And Red Hat-Based Systems
Fedora focuses on open-source software, so proprietary drivers require extra steps. You need to enable the RPM Fusion repository first. This repository provides software that Fedora cannot include by default due to licensing.
- Open a terminal and run
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm. - Then install the non-free repository:
sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm. - Update your package list:
sudo dnf update. - Search for available drivers:
sudo dnf search nvidia(replace with your hardware). - Install the driver:
sudo dnf install akmod-nvidia. - Reboot your system.
For Arch Linux And Manjaro
Arch-based systems use the Arch User Repository (AUR) for proprietary drivers. Manjaro has a built-in “Hardware Configuration” tool that simplifies this process. Open it from your application menu and select the driver you need.
For manual installation on Arch, you can use pacman to install open-source drivers. For proprietary NVIDIA drivers, run sudo pacman -S nvidia nvidia-utils. Always check the Arch Wiki for your specific hardware model.
Installing NVIDIA Graphics Drivers On Linux
NVIDIA graphics cards are the most common reason people search for how to install drivers on linux. The process varies depending on whether you want the open-source Nouveau driver or NVIDIA’s proprietary driver.
Using The Nouveau Open-Source Driver
The Nouveau driver is included in the Linux kernel and works out of the box for basic display. It supports 2D acceleration and basic 3D, but performance is limited. If you only need a desktop environment and don’t game, this driver is fine.
No installation is needed—it’s already there. You can check if it’s active by running lsmod | grep nouveau in a terminal. If you see output, the driver is loaded.
Installing NVIDIA Proprietary Drivers
For gaming, machine learning, or CUDA development, you need NVIDIA’s proprietary driver. Here’s the step-by-step process for Ubuntu:
- Open “Software & Updates” and go to the “Additional Drivers” tab.
- Select the NVIDIA driver marked as “proprietary, tested.”
- Click “Apply Changes” and wait for the download.
- After installation, reboot your computer.
- Verify the driver is working with
nvidia-smiin the terminal.
If you have a laptop with hybrid graphics (Intel + NVIDIA), you may need to install nvidia-prime to switch between GPUs. Run sudo apt install nvidia-prime and then use the NVIDIA Settings app to choose your preferred GPU.
Troubleshooting NVIDIA Driver Issues
Sometimes the driver installation fails or causes a black screen. If this happens, boot into recovery mode by holding Shift during startup. From the recovery menu, select “root” and run sudo apt purge nvidia-* to remove the driver. Then reboot and try a different driver version.
Another common issue is Secure Boot blocking the driver. You’ll need to disable Secure Boot in your BIOS/UEFI settings, or sign the driver manually. Disabling Secure Boot is simpler for most users.
Installing AMD Graphics Drivers On Linux
AMD graphics cards are generally easier to set up on Linux because AMD contributes to the open-source driver. The AMDGPU driver is included in the kernel and supports most modern AMD GPUs.
Using The Open-Source AMDGPU Driver
For most users, the open-source driver works perfectly. It supports Vulkan, OpenGL, and even some ray tracing features. No additional installation is needed—just plug in your card and it works.
You can check if the driver is loaded with lsmod | grep amdgpu. For gaming, install the Vulkan driver: sudo apt install mesa-vulkan-drivers on Ubuntu.
Installing AMD Proprietary Drivers (AMDGPU-PRO)
AMD also offers a proprietary driver called AMDGPU-PRO for enterprise and professional use. It’s rarely needed for desktop users. If you need it, download the installer from AMD’s website and run it as root.
The installation process is:
- Download the correct driver package for your distribution.
- Extract the archive:
tar -xf amdgpu-pro-*.tar.xz. - Navigate to the extracted folder.
- Run
./amdgpu-pro-install -y. - Reboot your system.
Most users should stick with the open-source driver. It’s more stable and receives updates through your package manager.
Installing Wi-Fi And Network Drivers
Wi-Fi drivers can be tricky on Linux because many adapters use proprietary firmware. Broadcom, Realtek, and Intel are common brands with varying support.
Checking Your Wi-Fi Chipset
First, identify your Wi-Fi hardware. Open a terminal and run lspci | grep Network for PCIe cards, or lsusb for USB adapters. Note the vendor and model number.
For Intel Wi-Fi cards, the driver is usually included in the kernel. You may need to install firmware: sudo apt install firmware-iwlwifi on Debian/Ubuntu.
Installing Broadcom Wi-Fi Drivers
Broadcom chips are common in older laptops and often require proprietary drivers. On Ubuntu, use the “Additional Drivers” tool to install “broadcom-sta-dkms.” On Fedora, enable RPM Fusion and run sudo dnf install broadcom-wl.
For Realtek chips, you may need to compile the driver from source. Check your distribution’s community forums for specific instructions, as Realtek support varies widely.
Installing Printer And Scanner Drivers
Most modern printers work with Linux through the CUPS (Common Unix Printing System) framework. HP printers are especially well-supported with the HPLIP package.
Using HPLIP For HP Printers
HPLIP provides drivers for HP inkjet and laser printers. Install it with sudo apt install hplip on Ubuntu. Then run hp-setup to detect and configure your printer.
The setup wizard will guide you through network or USB connection. It also installs scanner drivers if your printer has a scanner.
Generic Printer Setup
For non-HP printers, open your system’s printer settings. Click “Add Printer” and let it search for available devices. If your printer is detected, select it and choose a driver from the list. You can also download a PPD file from the manufacturer’s website.
If the printer isn’t detected, check that it’s turned on and connected to the same network. For USB printers, try a different cable or port.
Installing Drivers From Source Code
Sometimes you need to compile a driver from source code because no pre-built package exists. This is common for very new hardware or specialized devices.
Prerequisites For Compiling Drivers
You need development tools installed. On Ubuntu, run sudo apt install build-essential dkms linux-headers-$(uname -r). This installs the compiler, kernel headers, and DKMS (Dynamic Kernel Module Support).
Compiling A Driver Step By Step
- Download the driver source code from the manufacturer’s website.
- Extract the archive:
tar -xf driver.tar.gz. - Navigate to the extracted folder and read the README file for specific instructions.
- Typically, you run
maketo compile andsudo make installto install. - If the driver uses DKMS, run
sudo dkms add .andsudo dkms install. - Reboot your system to load the new driver.
Compiling drivers can be error-prone. If you get errors, check the manufacturer’s support forums or the Linux kernel mailing list for solutions.
Verifying Driver Installation
After installing a driver, you should verify it’s working correctly. Here are some commands to check:
lspci -kshows kernel drivers in use for each PCI device.lsmodlists loaded kernel modules.dmesg | grep -i drivershows recent driver-related messages.modinfo driver_namedisplays details about a specific driver.
For graphics drivers, run glxinfo | grep "OpenGL renderer" to see which GPU is being used. For network drivers, check your connection speed and stability.
Common Driver Installation Problems
Even with careful steps, things can go wrong. Here are frequent issues and how to fix them.
Black Screen After Driver Install
This usually happens with NVIDIA or AMD proprietary drivers. Boot into recovery mode and remove the driver. Then try a different version or stick with the open-source driver.
Wi-Fi Not Working After Update
Kernel updates can break proprietary Wi-Fi drivers. If this happens, reinstall the driver using DKMS. Run sudo dkms autoinstall to rebuild modules for the new kernel.
Driver Not Detected
If your hardware isn’t detected, check that the device is properly connected. For internal devices, reseat the card or try a different PCIe slot. For USB devices, try a different port.
FAQ: How To Install Drivers On Linux
Do I Need To Install Drivers On Linux?
Most hardware works out of the box with open-source drivers included in the kernel. You only need to install drivers manually for proprietary hardware like NVIDIA GPUs or certain Wi-Fi chips.
How Do I Find Out What Driver My Hardware Needs?
Use commands like lspci, lsusb, and lshw to identify your hardware. Then search for your distribution’s documentation or the hardware vendor’s Linux support page.
Can I Install Windows Drivers On Linux?
No, Windows drivers are not compatible with Linux. You must use Linux-specific drivers. Some Windows drivers can be used through NDISwrapper for network cards, but this is unreliable and not recommended.
How Do I Remove A Driver I Installed?
Use your package manager to remove proprietary drivers. For example, on Ubuntu, run sudo apt purge nvidia-* to remove NVIDIA drivers. For manually compiled drivers, run sudo make uninstall in the source directory.
What Is DKMS And Why Is It Useful?
DKMS (Dynamic Kernel Module Support) automatically rebuilds kernel modules when you update your kernel. This prevents driver breakage after system updates. It’s highly recommended for any driver you compile from source.
Final Tips For Driver Management
Always check your distribution’s documentation first. Ubuntu, Fedora, and Arch all have excellent wikis with hardware-specific guides. The Linux community is very active, so a quick forum search often solves your problem.
Keep your system updated regularly. Security updates and kernel patches often include driver improvements. Use your package manager’s update command weekly.
If you’re unsure which driver to choose, start with the open-source option. It’s less likely to cause problems and is easier to maintain. Switch to proprietary drivers only if you need specific features like CUDA or high-performance gaming.
Remember that not all hardware is equal on Linux. Before buying new hardware, check its Linux compatibility. Websites like “Linux Hardware Database” can help you make informed choices.
With these steps, you can confidently install drivers on any Linux distribution. The process becomes easier with practice, and soon you’ll be able to handle any hardware that comes your way.