How to Install Nvidia Driver on Ubuntu 20.04

install nvidia drivers on ubuntu 20.04

As Linux getting more user friendly, game developers are adding more support thanks to Steam. The performance of graphics processing units (GPUs) mainly depends on drivers. Ubuntu by default use open source video driver Nouveau which has limited support and features when compared with proprietary Nvidia drivers.

The proprietary Nvidia driver is essential to Ubuntu users looking to play games. However, if you are a basic user, there is no need to have this driver installed, as the open-source one works just fine.

In this tutorial, we are going to learn different ways to install Nvidia drivers on Ubuntu 20.04 LTS.

Check hardware Information of GPU

Before installing Nvidia drivers on Ubuntu, ensure that you have Nvidia GPU in your system. There are lots of commands available to get Linux hardware details.

To confirm this, simply run the following hwinfo command.

$ sudo hwinfo  --gfxcard --short
Install NVIDIA driver on Ubuntu 20.0420.04

You can check which card is being used by the prime-select command:

$ sudo prime-select query

prime-select query

The lshw command can display hardware and driver details of the currently used Nvidia card.

$ sudo lshw -c display | grep NVIDIA
Display NVIDIA driver only

The lspci command is another option to get the GPU hardware details.

$ sudo lspci -nnk | grep -iA3 vga
$ sudo lspci | grep -i --color 'vga\|3d\|2d'

If you have installed inxi tool, run the following command.

$ sudo inxi -Gx

Install Nvidia drivers using from GUI

Lets first check how to install Nvidia driver from the graphical user interface. On the main menu, type "software update manager" and click on it to open.

software and update manager

On the software updater pop-up, click on the 'Settings & Livepatch' button as shown.

software updater

This will launch the 'Software and Updates' window as shown below:

Install Nvidia driver on Ubuntu 20.04

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.

Both, 'Nvidia - drivers 430' (proprietary) and 'Nvidia - drivers 390' (proprietary) are available for GeForce GTX 1080 Ti card. Select the first option to install Nvidia driver 430.  When you are done, click on the Apply changes button to install the driver.

Then wait for the download to complete from the internet and click on the close button.

Reboot your computer for the changes to take effect. Run the following to reboot your PC.

$ sudo shutdown -r now


$ sudo reboot

Install Nvidia driver from the command line (CLI)

Then, run the following commands to check the list of driver devices available for the Nvidia card from the default Ubuntu repository.

$ sudo Ubuntu-drivers devices
sudo ubuntu-drivers devices

There are four Nvidia drivers available for the GeForce MX130 model. They include the Nvidia driver -440 non-free (which is recommended for Ubuntu system), Nvidia driver -435, and -390 distro non-free and the nouveau distro free builtin opensource video driver (default). Now you can run the following commands to install the specific driver you want.

$ sudo ubuntu-drivers autoinstall
Ubuntu drivers autoinstall
$ sudo apt install nvidia-driver-390
Install NVIDIA driver on Ubuntu 20.04

After the Nvidia diver has been installed, we have to reboot the computer in order to allow Nvidia prime (which is the technology) to switch in between the Intel Graphics and the Nvidia Graphics card.

$ sudo shutdown -r now

Verify using nvidia-smi

The nvidia-smi command line is a utility that is used for providing monitor and management capabilities for each and every devices i.e Nvidia Tesla, GRID, Quadro, and GeForce from Fermi and other higher architect families. Open the Terminal application and run the following command to see the Graphics Processing Unit and the process that is using the Nvidia GPU.

$ nvidia-smi
NVIDIA - smi

Configure the Nvidia Graphics driver

The Nvidia settings command starts a Graphics User Interface(GUI)  tool for configuration of Nvidia Graphics driver. This enables you to have a glance at all the GPU information and configure external monitors that are connected to your system.

Run the command below to launch the 'Nvidia and Server Settings' window.

$ sudo nvidia-settings
NVIDIA X server settings

How to uninstall the proprietary Nvidia driver

From open forums, I have noticed many users end up issues with removing Nvidia drivers and reinstalling. Let me share the steps I have followed to successfully uninstall the Nvidia driver and switch to the nouveau driver.

Step 1: Run the following command to confirm Nvidia drivers are installed in your system.

$ sudo dpkg -l | grep -i Nvidia
check if NVIDIA is installed

Step 2: Run the following commands to uninstall the proprietary Nvidia driver.

$ sudo dpkg -p $(dpkg -l | grep vidia-driver | awk '{print $2}')
$ sudo apt autoremove
$ sudo apt remove --purge '^nvidia-.*'
Remove Nvidia

Note that, the use of purge command will remove Nvidia diver together with all configurations that will be made. Run the flowing command to reinstall the Ubuntu desktop package.

$ sudo apt install ubuntu-desktop

Step 3: Run these commands to switch back to the nouveau driver.

$ sudo echo 'nouveau' | sudo tee -a /etc/modules
Add nouveau

Step 3: Remove the Xorg configuration file

Run the rm command to remove the Xorg configuration file

sudo rm /etc/X11/xorg.conf

Step 4: After that, reboot your system.

$ sudo shutdown -r now

Uninstall Nvidia Driver through GUI

Uninstalling the Nvidia driver using a GUI is quite easy. First, locate the 'software & Updates' app then click on it to open. Once it has opened, select on the Additional Drivers tab.

This will display all the Nvidia drivers that are available on Ubuntu. On the list under the 'Nvidia Corporation,' select " using X.Org X server - Nouveau display." This option will pass up the Nvidia graphics diver and it will install Nouveau display driver. For changes to take effect, click on the Apply changes button, and wait for some minutes.

install nouveau

Once Nvidia driver is uninstalled, a message will display saying, "No proprietary drivers are in use" Now close the Software & Updates application and then reboot your computer.


In this tutorial, we have covered two ways that you can use to install Nvidia drivers on Ubuntu 20.04 LTS.

With that said, Nvidia is bringing Vulkan which is intended to offer higher performance and more balanced CPU/GPU usage driver to Linux,  a replacement for OpenGL.

In recent years Redhat developers are adding extra code to Nouveau improve opensource code to make it much better, let's hope the near future we could use it for the modern game.

From Ubuntu 19.10, proprietary Nvidia drivers are available on install media (ie in ISO), which will bring a better fresh install experience for ubuntu users.

If you have any questions or feedback, feel free to leave a comment.

22 Comments... add one

  1. "sudo nvidia-settings": A much smaller window will open with only one choice listed left: "PRIME". And then there are three options on the right-hand side: performance mode, on demand and something. And two buttons: for help and quitting.

  2. Hi, I used Ubuntu on VirtualBox.

    I have use command hwinfo --gfxcard --short
    Here the result:

    graphics card:
    VMware VMWARE0405
    Primary display adapter: #14

    But after I check my computer hardware of GPU, it is run based on NVIDIA (NVIDIA GeForce GTX 1650).
    How do I change to Linux virtual system ? Or I just need to install NVIDIA right away ?

    Thanks for reading

  3. Hello! How about installing the driver downloaded from the official nvidia website? For example, for RTX 2060 (portable), there is version 450.66. How do I install it correctly? I have seen in 'Software and Updates' - Additional Drivers (I have Ubuntu 20.04), version 440 as the latest. Regards!

    • Hello Adrian,
      Simply download from nvidia the run file to install,and follow their instruction ! It should work on your system.
      My very simple arguments to convince you are :
      1 The run file is distro independent ,no matter what they are (Fedora,Debian,Ubuntu,OpenSuse....)
      in particular ,apart the drivers which are kernel version dependent,all their libraries are static !!!!
      including Cuda related stuffs .
      2 Except if you care about power consumtions for your battery-and open lids wakeup related,you do not need to bother about ppa, prime switching....associated with apt package management
      not always smooth resulting in so many griefs about black screen.repeatly looping on login troubles....
      And of course if you don't want to get into future troublesome updating kernel and your installed nvidia throwned away.....just dont accept dkms during install phase .
      Things are no more complicated than that

      Hope that help

  4. I wanted to thank you for the tutorial. I did an update to my unbuntu and nvidia got scrambled. I just started at $ sudo ubuntu-drivers autoinstall and worked down from there. Rebooted and my 2080TI is working great again on two monitors! Now to figure out how to do the refresh rate, 60hz on one monitor and 240hz on the other. Thanks again, Dylan

  5. Nice tutorial.
    My ROG-STRIX laptop, with TU117M [GeForce GTX 1650 Mobile / Max-Q] goes well with [NVIDIA-SMI 450.66 Driver Version: 450.66]: I can extend external display, which I can't go for original driver. But, after install the 450.66 driver. the shutdown process stucks with these messages:
    [3178.479403] system-shutdown[1]: Waiting for process: crond
    [3259.460908] reboot: System

    And I have to hold the power button 5s to turn off. Does the issue reate to the driver that I install?
    BTW: I use Ubuntu 20.04 LTS.

    Please help,


Leave a Comment