How to Install NVIDIA Drivers on Ubuntu (2025 Updated Guide)
🚀 Installing NVIDIA Drivers on Ubuntu (2025 Edition)
If you're using an NVIDIA GPU and want to take full advantage of its performance under Ubuntu, you're in the right place.
⚠️ Forget about old PPAs like
xorg-edgers
. They’re deprecated and can break your system. Let’s do this the clean, modern, and safe way.
🧠 Method 1: Automatic Driver Installation (Recommended)
Ubuntu includes a built-in tool to automatically detect your GPU and install the correct driver.
✅ Steps:
- Open a terminal and run:
sudo ubuntu-drivers devices
This will show you a list of recommended drivers.
- Then run:
sudo ubuntu-drivers autoinstall
This command installs the best-matched NVIDIA driver for your system.
- Reboot your system:
sudo reboot
🛠️ Method 2: Manual Driver Installation
If you prefer to choose the driver version manually:
🔍 Step 1: Check available drivers
apt search nvidia-driver
This lists all the NVIDIA driver packages available in the Ubuntu repositories.
📦 Step 2: Install the version you want
Example for driver version 535:
sudo apt update
sudo apt install nvidia-driver-535
Always use a version that matches your GPU and system compatibility.
🔄 Step 3: Reboot
sudo reboot
🧹 (Optional) Clean Up Old PPAs
If you've used deprecated sources like xorg-edgers
, it’s a good idea to remove them:
sudo add-apt-repository --remove ppa:xorg-edgers/ppa
sudo apt update
🧪 How to Verify the Installation
After rebooting, check if the driver is active:
nvidia-smi
If you see your GPU listed along with the driver version and processes, you're good to go.
✅ Conclusion
Using the official Ubuntu repositories is the safest and most stable way to install NVIDIA drivers in 2025. Avoid outdated PPAs and enjoy smoother performance in games, development, and CUDA tasks.
Until next time! 👋