The objective of this guide is to show how to install Nvidia GPU drivers on Kali Linux, along with the CUDA toolkit.

In this tutorial you will learn:
  • How to install Nvidia GPU drivers on Kali Linux
Installing Nvidia drivers on Kali Linux
Installing Nvidia drivers on Kali Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Kali Linux
Software Nvidia GPU drivers
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

Install Nvidia GPU drivers on Kali

Open a command line terminal and follow along with the steps below to install Nvidia drivers and CUDA toolkit. Then, we'll go over how to test the installation and verify that the driver is setup.

  1. First, ensure that the system is totally up to date.
    $ sudo apt update
    $ sudo apt -y full-upgrade
    $ sudo apt -y autoremove
    $ reboot
    
  2. Next, determine what video card you have installed, and verify that it's using the nouveau open source driver.
    $ lspci | grep -i vga
    00:02.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
    
    To get information about the drivers installed, use the lspci command again with the following syntax, replacing 00:02.0 with your number from the previous output.
    $ lspci -s 00:02.0 -v
    ...
    Kernel driver in use: nouveau
    Kernel modules: nouveau
    

  3. SUBSCRIBE NEWSLETTER & RSS
    Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  4. Next, use apt package manager to install the drivers and CUDA toolkit with the following command.
    $ sudo apt install nvidia-driver nvidia-cuda-toolkit
    
  5. When the process completes, reboot your computer for the changes to take effect.
    $ reboot
    
  6. You can now verify that your system is using Nvidia drivers instead of nouveau.
    $ lspci -s 00:02.0 -v
    ...
    Kernel driver in use: nvidia
    Kernel modules: nvidia
    
  7. Next, we can use hashcat to perform a benchmark test.
    $ sudo apt install hashcat
    $ hashcat -b | uniq
    

Conclusion

In this guide, we saw how to install Nvidia drivers on Kali Linux. We also learned how to install the CUDA toolkit and use hashcat to perform a benchmarking test, allowing integration with Kali's penetration testing tools.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.


Comments and Discussions