What you should know first
- There are two main kinds of NVIDIA driver packages:
- Unified Driver Architecture (UDA) — more “general purpose”, used for desktops/gaming.
- Enterprise Ready Drivers (ERD) / “-server” suffix — optimized for servers / compute workloads.
- If Secure Boot is enabled, you’ll need signed kernel modules or enroll a Machine Owner Key (MOK).
- Always check which kernel you’re running and make sure kernel headers for that version are installed. Without matching headers, driver modules may fail to compile.
🔧 Installation Methods
Here are the common ways to install, with pros & cons.
| Method | Pros | Caveats |
|---|---|---|
Using ubuntu-drivers tool (recommended Route) | Easy, handles dependencies; works well with Secure Boot; automatically picks a compatible driver. (Ubuntu Documentation) | Less control over specific version if you need something non-standard. |
Manual install via APT packages (nvidia-driver-..., kernel modules, etc.) | More control; can pick server vs non-server branch; good for fine-tuning. | More steps; risk of mismatch; need kernel headers; Secure Boot handling can be trickier. |
| run script from NVIDIA website | Sometimes only way to get latest drivers or support for very new/edge hardware. | More risk: clashes with packages; you must manage updates yourself; more manual work; not always recommended. |
🛠 Step-by-Step (Ubuntu’s Recommended Route)
Here’s a streamlined version using Ubuntu’s ubuntu-drivers tool and APT.
Update system
sudo apt update
Check current driver version (if any) (if you haven’t installed a driver, you can skip this!)
cat /proc/driver/nvidia/version
List drivers available for your hardware (Optional)
For generic desktop/gaming:
sudo ubuntu-drivers list
For server / GPGPU / compute workloads:
sudo ubuntu-drivers list --gpgpu
You’ll see something like nvidia-driver-535, nvidia-driver-535-server, etc.
Install the driver
sudo ubuntu-drivers install
Reboot.
sudo reboot
After the system has rebooted, the drivers should now be installed and running. Try the nvidia-smi command.
Additional steps for power users. (Optional)
- Install additional utils (optional/if needed)
Especially for server drivers, you might want things likenvidia-utils-<version>, or for special hardwarenvidia-fabricmanagerorlibnvidia-nscq. (Ubuntu Documentation) - Verify installation
Use commands like:nvidia-smito check GPU is recognized, see driver version, etc.
Removing / Switching Drivers
If things go wrong, or you want to switch versions:
- Purge existing NVIDIA drivers (
sudo apt --purge remove '*nvidia*' sudo apt autoremove) - Then install the new one via above methods.
