Introduction: Nvidia graphics processing units (GPUs) used for gaming and professional use in offices. Nvidia GPUs used in data centers, visualization, automobile industry, and artificial intelligence. By default X.org X server use nouveau free/libre software drivers for nVidia cards. The nouveau driver generally provides the inferior performance to Nvidia’s proprietary graphics device drivers for gaming and other professional use. This page shows how to install Nvidia GPU drivers on an Ubuntu Linux desktop.
Ubuntu Linux Install Nvidia Driver
The procedure to install proprietary Nvidia GPU Drivers on Ubuntu 16.04 / 17.10 / 18.04 / 18.10 / 20.04 LTS is as follows:
- Update your system running apt-get command
- You can install Nvidia drivers either using GUI or CLI method
- Open “Software and Updates” app to install install Nvidia driver using GUI
- OR type “sudo apt install nvidia-driver-455” at the CLI
- Reboot the computer/laptop to load the drivers
- Verify drivers are working
Let us see all commands in details.
Find out information about your GPU
Naturally, you can only install Nvidia driver if you have Nvidia GPU in your system. Type the hwinfo command/lshw command to find out info about your GPU:
$ hwinfo --gfxcard --short
$ sudo lshw -C display
See “Linux Find Out Graphics Card Installed In My System” for more info.
Install Nvidia driver using GUI method # 1 on Ubuntu Linux
Press the Super key (Windows key) and type the following in search box:
Click on the Settings button:
Click on the Additional drivers tab:
Choose nvidia-driver-460 (proprietary, tested) and click on the Apply Changes button. You must authenticate yourself to install Nvidia driver on Ubuntu Linux. You must wait for some time as Nvidia driver downloaded and installed from the internet:
Click on the Close button when done. You must reboot Ubuntu Linux computer to use the driver by typing the following shutdown command:
$ sudo shutdown -r now
$ sudo reboot
Now skip to the driver verification step.
Ubuntu Install Nvidia driver using the CLI method # 2
Open the termial application and search for nvidia drivers using the apt command or apt-get command:
$ apt search nvidia-driver
OR use the apt-cache command to search package:
$ apt-cache search nvidia-driver
Do not skip the following two commands as you must apply all pending security updates:
$ sudo apt update
$ sudo apt upgrade
Installing NVIDIA drivers on Ubuntu
Let us install the nvidia-driver-390 package:
$ sudo apt install nvidia-driver-390
At this time, the latest tested proprietary drive version is 460. We can install that one as follows on Ubuntu Linux 20.04 LTS:
$ sudo apt install nvidia-driver-460
Reboot the Linux with help of either reboot or shutdown command:
$ sudo reboot
Now go to the driver verification step.
Open the terminal application and type nvidia-smi to see GPU info and process that are using Nvidia GPU:
The nvidia-smi command line utility provides monitoring and management capabilities for each of NVIDIA’s Tesla, Quadro, GRID and GeForce devices from Fermi and higher architecture families. You can see running apps on your GPU and GPU temperature.
How do I configure the NVIDIA graphics driver?
The nvidia-settings command start a GUI tool for configuring the NVIDIA graphics driver. This is useful to see all GPU info or configure multiple external screen/monitors connected to your system. Open the terminal and type the following commands:
If you wish to save settings start it as follows:
$ sudo nvidia-settings
A note about ubuntu-drivers command-line method # 3
We can also change drivers without the use of the X GUI/Windows desktop. For these purposes, Ubuntu comes with a unique command called ubuntu-drivers to manage binary drivers for NVidia and other devices. This is an alternative to the apt command/apt-get command we used earlier.
Show all driver packages which apply to the current system
$ sudo ubuntu-drivers list
Outputs from my Thinkpad X1E laptop:
Display all OEM enablement packages which apply to this system
$ sudo ubuntu-drivers list-oem
View all hardware NVidia devices which need drivers, and which packages
$ sudo ubuntu-drivers devices
Here is what we see:
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00001F91sv000017AAsd0000229Fbc03sc00i00 vendor : NVIDIA Corporation model : TU117M [GeForce GTX 1650 Mobile / Max-Q] driver : nvidia-driver-440-server - distro non-free driver : nvidia-driver-455 - distro non-free recommended driver : nvidia-driver-418-server - distro non-free driver : nvidia-driver-450 - distro non-free driver : nvidia-driver-450-server - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin
Ubuntu command to install a driver NVidia version 455
Warning: You can use only one method. If you use an earlier GUI or apt CLI method, do not try the following command. I have observed broken systems if you mixed various methods on the same system. Stick with one method.
Let us install recommended driver automatically:
sudo ubuntu-drivers install
You learned three different ways to install Nvidia Driver on Ubuntu 18.04 and 20.04 LTS Linux desktop or server. Unmistakably, the GUI method is simple and easy to use. The CLI method is useful for server installation, and the ubuntu-drivers command-line method is recommended for a fresh installation or OEM system like Dell XPS 13 and others. The For more info, see the official Nvidia Unix/Linux driver page online.
🐧 14 comments so far... add one ↓
|Category||List of Unix and Linux commands|
|Disk space analyzers||ncdu • pydf|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||NetHogs • dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|