In this articlewe will show you how to install the official NVIDIA drivers on Kali Linux.
Topic of Contents:
- Checking If NVIDIA GPU Is Installed on Kali Linux Machine
- Why Use the Official NVIDIA Drivers Instead of Nouveau Drivers
- Updating the Kali Linux Packages
- Installing the Official NVIDIA Drivers on Kali Linux
- Checking If the NVIDIA Drivers Are Installed Correctly on Kali Linux
- Conclusion
Checking If NVIDIA GPU Is Installed on Kali Linux Machine
You can check whether your Kali Linux machine has an installed NVIDIA GPU from the command line.
To check whether your Kali Linux machine has an installed NVIDIA GPU, open a Terminal app and run the following command:
As you can see, we have an NVIDIA GeForce GTX 1050 Ti GPU installed on our Kali Linux machine. You will most likely have a different NVIDIA GPU installed on your computer.
Why Use the Official NVIDIA Drivers Instead of Nouveau Drivers
By default, Kali Linux uses the Nouveau drivers instead of the official NVIDIA drivers if you have an installed NVIDIA GPU on your computer.
$ lsmod | grep nouveau
There are differences between the open-source Nouveau drivers and the official NVIDIA drivers. In terms of performance and features, the official NVIDIA drivers is a better pick.
Updating the Kali Linux Packages
Before you install the NVIDIA drivers on Kali Linux, we recommend you to update the Kali Linux to the latest version. If you need any assistance on that, read the article on How to Update the Kali Linux Packages.
Installing the Official NVIDIA Drivers on Kali Linux
Now that you updated your Kali Linux to the latest version, you are ready to install the official NVIDIA drivers on Kali Linux.
First, update the package repository cache of Kali Linux with the following command:
To install the official NVIDIA GPU drivers on Kali Linux, run the following command:
To confirm the installation, press Y and then press <Enter>.
The official NVIDIA drivers and the required dependency packages are being downloaded from the internet. It takes a while to complete.
The official NVIDIA drivers and the required dependency packages are being installed. It takes a while to complete.
Once you see the following prompt, press <Tab> to select OK and press <Enter>.
The installation should continue.
At this point, the official NVIDIA drivers should be installed.
For the changes to take effect, restart your computer/laptop with the following command:
Checking If the NVIDIA Drivers Are Installed Correctly on Kali Linux
There are a few ways to verify whether the official NVIDIA drivers are working on Kali Linux. In this section, we will show you three of the most common methods.
The first method is to check whether the NVIDIA kernel modules are loaded instead of the NOUVEAU kernel modules.
To check whether the NVIDIA kernel modules are loaded instead of the NOUVEAU kernel modules, run the following commands:
$ lsmod | grep nvidia
You should see that the NVIDIA kernel modules are loaded instead of the NOUVEAU kernel modules as shown in the following screenshot. This means that the official NVIDIA drivers are working just fine on Kali Linux.
The second method is to run the nvidia-smi command from the command line and see if it prints the usage information about your NVIDIA GPU. If the official NVIDIA drivers are working, the command should print the NVIDIA GPU usage information correctly.
You can run the nvidia-smi command from the command line of Kali Linux as follows:
As you can see, the nvidia-smi command prints the NVIDIA GPU usage information correctly. So, the official NVIDIA drivers are working just fine.
The third method is to see whether the “NVIDIA X Server Settings” app is available and runs correctly.
You can search for the “NVIDIA X Server Settings” app in the “Application Menu” of Kali Linux. As you can see in the following screenshot, the “NVIDIA X Server Settings” app is available. Click to open it.
As you can see, the “NVIDIA X Server Settings” app is running just fine and it shows up all the information about our NVIDIA GPU correctly. So, the official NVIDIA drivers are working just fine on Kali Linux.
Conclusion
We showed you how to check whether you have an installed NVIDIA GPU on your Kali Linux machine. We also showed you how to install the official NVIDIA GPU drivers on Kali Linux. Finally, we showed you how to verify if the official NVIDIA GPU drivers are working on Kali Linux.