Ubuntu's ubuntu-drivers tool selects an NVIDIA driver that fits your hardware, so you don't need to guess a driver number from a tutorial. Update Ubuntu, run sudo ubuntu-drivers install, then restart and check that the driver loaded.
This route is for Ubuntu running directly on your PC. Ubuntu inside Windows (WSL) needs the separate Windows driver route.
For a normal laptop or gaming desktop, use the desktop installation route. Compute servers have a separate --gpgpu option and server packages; those aren't the default choice for getting your desktop display working.
In this guide
Check the computer and update Ubuntu first
Open Terminal with Ctrl+Alt+T on Ubuntu Desktop. Save your work before updating, because the preparation includes a restart. Run these commands separately so you can read any package errors before continuing:
sudo apt update
sudo apt upgrade
Type your account password at the prompt. Terminal doesn't show password characters as you type. Read the proposed changes, confirm the upgrade if you're ready to proceed, and let package installation finish before restarting.

Restart Ubuntu after the updates complete. That starts the updated system and kernel before you choose a driver. The kernel is the part of Linux that the graphics driver must work with.
If apt update reports download or repository errors, fix those first. A driver install needs access to the packages for your Ubuntu release. Continuing with a failed package refresh can leave you working from an outdated package list.
For a computer without networking, the Ubuntu offline Wi-Fi driver guide covers a separate Broadcom problem. Get networking working before following this online NVIDIA installation route.
Let Ubuntu choose the desktop driver
List the drivers available for your hardware:
sudo ubuntu-drivers list
Check which driver packages it offers for your computer. Package names vary with the GPU and Ubuntu release. A number printed in an older example isn't a recommendation for your computer.
Then install the automatically selected desktop driver:
sudo ubuntu-drivers install
Canonical recommends the ubuntu-drivers installation route, including for Secure Boot systems. It chooses drivers the same way as the graphical Additional Drivers tool.

Allow the command to finish, then restart. Installing the package doesn't switch an already running desktop over to the new driver immediately. The restart is also needed when old driver components remain loaded in memory.
Don't combine this routine installation with an NVIDIA .run installer or an unrelated package repository. Software installed outside Ubuntu's documented routes can overwrite its driver packages and cause Secure Boot problems.
If ubuntu-drivers is missing, install its package with sudo apt install ubuntu-drivers-common, then retry sudo ubuntu-drivers list. Resolve any package-manager error before retrying the driver.
Check whether Ubuntu is running inside WSL
Ubuntu installed through Windows Subsystem for Linux uses a different graphics route from a PC booted directly into Ubuntu. Use these Linux desktop-driver commands only when Ubuntu is running directly on the PC.
For GPU work in WSL 2, follow the Windows GPU compute setup. Install the supported NVIDIA Windows driver in Windows, then use the WSL instructions for the workload you need.
A Windows driver and a native Linux driver aren't interchangeable downloads. Tell support whether you started Ubuntu directly or opened its terminal inside Windows. They'll need that detail to help repair the right driver installation.
Keep desktop and compute packages separate
For desktop graphics and games, the plain install command chooses the general display driver. A package with -server in its name belongs to the enterprise or compute driver family rather than the ordinary desktop route.
For a server doing computing work, list the compute options with sudo ubuntu-drivers list --gpgpu. The matching automatic installation is sudo ubuntu-drivers install --gpgpu. Follow the server documentation for its utilities too.
Fabric Manager and the NVSwitch library are for machines with NVSwitch hardware. An ordinary GeForce laptop doesn't need those packages simply because they appear on the same documentation page.
Some package names include -open. Let hardware detection choose; not every NVIDIA GPU supports every open kernel-module package. Use the choices offered for your computer instead of picking from a general download list.
An older GPU can also need a different supported branch from a newer one. If the command offers no suitable driver, record the GPU model and Ubuntu version for support instead of forcing a branch intended for another generation.
Check the loaded driver after restarting
Open Terminal again and check the running driver:
cat /proc/driver/nvidia/version
If the NVIDIA driver has loaded, this shows its version. That tells you which driver is running, rather than just showing that an NVIDIA package is installed.
If the matching utility is installed, nvidia-smi can show the detected GPU and driver. For a missing command, use the documented utility package for your selected branch, rather than switching driver numbers.
Test the desktop behavior you wanted to repair as well: display resolution, an external monitor, or the affected application. A laptop with integrated and NVIDIA graphics can still use the integrated GPU for some work.
A Windows installation has its own driver process. The NVIDIA restart guide for Windows applies when dual-booting into Windows, not when checking the Linux module loaded by Ubuntu.
Fix a driver mismatch or failure to load
An NVML driver/library mismatch after an update can mean newer libraries are installed while the previous driver remains loaded. Restart before removing packages; reinstalling immediately can leave that mismatch unresolved.
If the NVIDIA version file is missing after a restart, the driver hasn't loaded successfully. Note the kernel with uname -r and keep the install output.
An installed package can still have a kernel module that won't run. That's the part of the driver that works with Linux itself.
Secure Boot requires signed kernel modules. Ubuntu's recommended route uses signed, prebuilt modules by default. A custom kernel or a driver built through DKMS can need different module and signing steps.
DKMS builds a driver to work with a particular kernel. That route can suit a custom kernel; it isn't an extra installation step after the automatic method.
If you're using that route and see a key-enrollment prompt, follow the instructions to sign the driver. Leave Secure Boot enabled while checking a failed driver load; check the selected package and kernel together.
For an installation that still fails, ask Ubuntu support for help matching the NVIDIA driver module to the running kernel. Include the Ubuntu release, GPU model, uname -r, selected packages, and the exact install or load error.
The Short Version
Update Ubuntu and reboot, then use sudo ubuntu-drivers install for a desktop. Restart and check the loaded driver. Compute packages, custom kernels, and WSL need their own routes.
Checked December 3, 2026.







