Skip to content
  • Home
  • About the Blog
  • About the Author
  • Sitemap

Abdur Rosyid's Blog

Just a few notes on mechanical engineering and robotics

Installing NVIDIA GPU Driver on Ubuntu

June 6, 2025 by Abdur Rosyid

This is a method to make sure that a recommended driver of your NVIDIA GPU is installed in your Ubuntu computer:

Step 1: Check for NVIDIA GPU availability and driver information:
nvidia-smi

If this command returns the driver information of your NVIDIA GPU, you can skip the next steps.

Step 2:
Check for Existing NVIDIA Drivers: If you’ve tried installing drivers before and had issues, it’s a good idea to purge any existing NVIDIA packages to avoid conflicts.
sudo apt-get remove –purge ‘^nvidia-.‘ ‘^libnvidia-.‘ ‘^cuda-.*’
sudo apt autoremove
sudo apt clean

Step 3:
sudo apt update
sudo apt upgrade

Step 4:
Install Essential Build Tools: These are needed for kernel module compilation (DKMS).
sudo apt install build-essential linux-headers-$(uname -r)

Step 5:
List Available Drivers:
ubuntu-drivers devices

This command will scan your hardware and list the available NVIDIA drivers for your specific GPU, indicating which one is recommended. You’ll see output like:
driver : nvidia-driver-550 – recommended

Step 6:
Install the Recommended Driver:
sudo ubuntu-drivers autoinstall
This command will automatically install the NVIDIA driver version that ubuntu-drivers devices marked as recommended.

Step 7:
Reboot the computer:
sudo reboot

Step 8:
Verify Installation:
nvidia-smi
You should see detailed information about your NVIDIA GPU, driver version, CUDA version, and GPU utilization. If this command returns information, your drivers are successfully installed.

Step 9:
If you have NVIDIA GPU:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg –dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed ‘s#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g’ | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit

Post navigation

Previous Post:

A Docker Cheat Sheet

Next Post:

A Conda Cheat Sheet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • STEM 101
  • Robotics
  • Kinematics
  • Dynamics
  • Control
  • Robot Operating System (ROS)
  • Robot Operating System (ROS2)
  • Software Development
  • Mechanics of Materials
  • Finite Element Analysis
  • Fluid Mechanics
  • Thermodynamics

Recent Posts

  • Pull Request on Github
  • Basics of Git and Github
  • Conda vs Docker
  • A Conda Cheat Sheet
  • Installing NVIDIA GPU Driver on Ubuntu

Archives

  • June 2025
  • July 2021
  • June 2021
  • March 2021
  • September 2020
  • April 2020
  • January 2015
  • April 2014
  • March 2014
  • March 2012
  • February 2012
  • June 2011
  • March 2008
© 2025 Abdur Rosyid's Blog | WordPress Theme by Superbthemes