How to Install Nvidia Drivers on Ubuntu

Install the latest drivers from an official PPA

Install Nvidia Drivers on Ubuntu

For years, NVIDIA has provided top quality Linux drivers for their products, which often perform just as well as their Windows counterparts. While AMD has become competitive in the Linux market, NVIDIA is still a great pick. However, you can't take advantage of NVIDIA cards until you know how to install drivers on Linux. Fortunately, getting the latest drivers for your card set up on Ubuntu is a breeze.

How to Install Nvidia Drivers on Ubuntu

  1. Before you start, you’ll need to know which drivers to install. If you have one of the latest NVIDIA cards, don’t worry. Just use the highest version number available. For cards earlier than the GTX 600 series, consult NVIDIA’s driver reference.

  2. Go to the Ubuntu Graphics PPA page, and scroll down. Check the version numbers, and find the latest number compatible with your card.

    NVIDIA Graphics PPA for Ubuntu
  3. Open a new terminal window. Type in the following command to add the Ubuntu Graphics PPA to your system:

    $ sudo add-apt-repository ppa:graphics-drivers/ppa
    Adding the Graphics PPA to Ubuntu

    Even though it’s a PPA, it’s maintained by actual Ubuntu developers, so there’s no need to worry about quality. The PPA also receives frequent updates, meaning you’ll always have the latest drivers for Ubuntu.

  4. Use the following command to update Apt to refresh your list of repositories. Apt needs to know about the PPA you added before using it.

    $ sudo apt update
  5. Now, you’re ready to install your drivers. You’ll want to install NVIDIA’s Linux settings manager, too, so run the following command in your terminal window, substituting the version number you intend to install.

    $ sudo apt install nvidia-graphics-drivers-415 nvidia-settings vulkan

    Only add "vulkan" to the end if you want support for the latest graphics API for Linux. Vulkan is the Linux equivalent to DirextX 12, and is even being used to run DX12 games from Windows through Wine.

  6. Before you can start using you drivers, you’ll need a configuration too. In your terminal, run the following command to use NVIDIA’s utility and set up your basic configuration:

    $ sudo nvidia-xconfig
    NVIDIA Xorg Configuration

    Your computer will read this configuration file when you start up to apply different graphics preferences you set.

  7. Restart your computer. That’s the only way to load the drivers, so go ahead and do that now.

  8. When your computer starts back up, you’ll probably notice some changes, and probably, a better desktop resolution. Everything probably won’t be perfect, but that’s where the settings utility that you installed comes in.

  9. Run the settings utility with admin privileges by opening your terminal and running the command below to open the settings:

    $ sudo nvidia-settings
  10. The window will open up, letting you make changes to your configuration.

  11. When you first see the NVIDIA X Server Settings window, the tab you arrive on displays some information about your graphics card, the version of your drivers, and your system. Take a look, and see if everything seems correct.

  12. The rest of the settings are entirely up do you. The X Server Display Configuration is what will interest most people. It's where you can configure your monitor(s), set up their resolution, refresh rate, and positioning.

    Whichever options you choose, be sure to select Save to X Configuration File before you exit to apply your changes to the configuration file you created earlier and make them permanent on your system.

  13. You’re ready to enjoy your NVIDIA drivers on Ubuntu. You'll continue to receive regular driver updates from the PPA, meaning your system will never fall out of date.