Itching your head due to missing device driver on your machine? Looking for how to install a device drive on a Linux system? Just switched to a new OS, but hardware is not working well? Check out this article to learn how you can install a missing device drive on your Linux system.
Installing and configuring a driver on a Linux based machine is quite daunting for those who just switched to Linux from Windows/Mac, or trying the new OS with dual boot. The widely used windows and Mac operating system often makes it a user-friendly experience when it comes to install device drivers, but in case of a Linux OS, the user might find some of their hardware is not working. Well, this would not be an issue anymore.
Is it challenging to install a device driver on Linux?
For Windows and Mac OS users, it’s really an easy approach to install any device driver as the OS detects those automatically. Also, the users can download the missing ones from the internet, and just click on a simple wizard to have the driver installed.
However, in case of a Linux platform, the process is not enough simple. One of the most common reason is, Linux is an open-source OS and a number of variations available. So, there can’t be a single method that can suit all Linux platforms, and every of the distribution has its own way regarding how to install a device driver on system.
In addition, most of the default Linux drivers are open-source and integrated in the system, and this makes the installation of missing drivers quite complicated, if not included already with OS. Still, most of the useful drivers are automatically detected with popular Linux distros.
Another reason why installing a device driver on a Linux can be complicated is license policies which technically vary among Linux distributions. Such as Fedora restricts to include drivers which are legally prohibited or violate cyber laws. Even Ubuntu asks its users to prevent using closed hardware.
Means, installing a device driver on a Linux can be a bit challenging, but still here mentioned 2 approaches can be helpful.
Two Methods To Find Drivers & Install on Linux
Approach 1: Using Built-in Interface
Newbies must know that Linux platform mostly offers possible ways to check a driver is available through built-in wizards. For Example, the Ubuntu Distro allows users to deal with an option called Additional Drivers. You can find this option on Ubuntu within Software Updater > Additional Drivers.
For Lubuntu users:
For Kubuntu users:
For Xubuntu users:
Other Linux distros also offer similar helper applications like GNOME Package Manager, allowing users to check for available drivers.
Approach 2: Using Command Line
Although, most of your hardware’s driver can easily be found using Linux GUI interface. But, what if you fail to find a certain driver through GUI offered by the distro. In this case, you can use Command line option to find a certain driver. To do so, users have two options which are mentioned below:
Option 1: Using a repository
If you are familiar Mac OS, you might aware of the term homebrew. In Linux, there’s a similar command as well through which you can add repository to your system and install a device driver. Some well known commands used in various Linux distros include yum, dnf, apt-get, and so on. Adding a repository allows you to update the package cache, and this might install any missing driver.
Option 2: Download, compile and build it yourself
Under this option, you can download the driver package directly from its official website or by using wget command, and run the configuration file and Makefile to install the package. This option may be different for various Linux distributions. So we suggest you to check for specific guidelines for your OS type and device.
How to check already installed driver details?
Since we are going discuss how to install a device driver on Linux, it’s necessary to know if what drivers are already installed on your machine.
In order to do so, we can use lscpci command which brings information about all PCI buses and active devices on a Linux machine. Below are the commands to use:
Filtering the details using grep command:
sudo lscpi | grep driver_name
To determine all device drivers recognized by kernel, we can use the following command:
or use grep to filter the details
sudo dmesg | grep driver_name
However, in case if you find nothing with above two mentioned command, then you can use the following two command to check if the driver is at least loaded on the disk:
If you end up noticing the device driver is loaded on the disk with above two commands, but not recognized by the kernel, then you can load the module using below command:
sudo modprobe missing_mod_name
How to install a device driver by adding a repository?
As mentioned already, there can be various commands which we use to add a repository in different Linux platforms such as yum, dnf, and apt-get. Under this example, we are using apt-get command, however the measures in other distros will be similar.
In order to add a repository and install a missing driver, follow the steps mentioned:
Step 1: Delete existing repository, if already existing
sudo apt-get purge Driver_Name
In the above command, the Driver_Name is actually the name of driver which is missing or not installed properly.
Step 2: Adding the repository to repolist
sudo apt-get-repository Driver_Repolist
Here, Driver_Repolist value can be found on a certain driver’s documentation. You should read the documentation to determine the name specific to driver which you want to install.
Step 3: Updating the repository list on your machine
sudo apt-get update
Step 4: Installing the driver package
sudo apt-get install Driver_Name
Once the installation is done, you can check if the driver is installed and loaded correctly with the commands discussed above (lscpi command).
This tutorial regarding how to install a device driver on Linux might be helpful to install a missing driver on your machine. If you find the guidelines really helpful, share it with your friends. For any doubts or questions, comment in the section below. Click Suggest Us to suggest any edit to tutorial.