Here is how to install Nvidia Graphics Driver on Ubuntu Linux. Terminal commands to install latest Nvidia Driver on Ubuntu 20.04 and other Ubuntu Systems.
Pre-Installation Requirements
Before installing the NVIDIA driver on Linux, some pre-installation steps are recommended to:
* Verify the system has a CUDA-capable GPU
* Verify the system is running a supported version of Linux
* Verify the system has build tools such as make, gcc installed
* Verify the system has correct Linux kernel headers and development packages installed.
* Download the NVIDIA CUDA Toolkit.
* Handle conflicting installation methods.
Verify You Have a CUDA-Capable GPU
To verify that your GPU is CUDA-capable, go to your distribution’s equivalent of System Properties, or, from the command line, enter:
lspci | grep -i nvidia
If you do not see any settings, update the PCI hardware database that Linux maintains by entering update-pciids (generally found in /sbin) at the command line and rerun the previous lspci command.
If your graphics card is from NVIDIA and it is listed in http://developer.nvidia.com/cuda-gpus, your GPU is CUDA-capable.
Alternatively, you can also run:
sudo hwinfo --gfxcard --short
sudo prime-select query
sudo lshw -c display | grep NVIDIA
Verify You Have a Supported Version of Linux
The CUDA Development Tools are only supported on some specific distributions of Linux. These are listed in the CUDA Toolkit release notes.
To determine which distribution and release number you’re running, type the following at the command line:
uname -m && cat /etc/*release
You should see output similar to the following, modified for your particular system:
x86_64
Red Hat Enterprise Linux Workstation release 6.0 (Santiago)
The x86_64 line indicates you are running on a 64-bit system. The remainder gives information about your distribution.
Verify the System Has gcc Installed
The gcc compiler is required for development using the CUDA Toolkit. It is not required for running CUDA applications. It is generally installed as part of the Linux installation, and in most cases the version of gcc installed with a supported version of Linux will work correctly.
To verify the version of gcc installed on your system, type the following on the command line:
gcc --version
If an error message displays, you need to install the development tools from your Linux distribution or obtain a version of gcc and its accompanying toolchain from the Web.
Install Nvidia driver from the command line (CLI)
Run the following commands:
sudo Ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo apt install nvidia-driver-440
sudo shutdown -r now
You can also install via PPA:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo apt install nvidia-driver-440
sudo shutdown -r now
Once installed, please update the system:
sudo apt-get upgrade
sudo apt-get update
Once installed, verify using the command “nvidia-smi”.
nvidia-smi
NOTE: You can also install Nvidia drivers using from GUI. To do so:
1. Open Ubuntu Dash and type “software update manager” and click on it to open.
2. On the software updater pop-up, click on the ‘Settings & Livepatch’ button. This will launch the ‘Software and Updates’ window.
3. At the top-most section of the ‘Software and updates’ windows, be sure to find a couple of options displayed which include Ubuntu software, other software, updates e.t.c. In this case, click on Additional Drivers, you can see there, the ‘Nvidia – driver -435’ (proprietary, tested) is set up as default driver used for Nvidia card, along with some proprietary divers listed.
4. You will see 2 options ‘Nvidia – drivers 430’ (proprietary) and ‘Nvidia – drivers 390’ (proprietary) available for GeForce GTX 1080 Ti card. Select the first ‘Nvidia – drivers 430’ (proprietary) to install Nvidia driver 430.
5. Click on the Apply changes button to install the driver.
6. 6. Allow some time to download and complete the process and click on the close button when done.
6. Restart the system to apply the changes.