Install NVIDIA Drivers on Ubuntu (command-line and GUI ways)

You will need appropriate Nvidia drivers to make sure your graphics card can perform to its fullest. Here's a tutorial on how to install Nvidia drivers on Ubuntu.

By default, Linux Kernel comes with the open-source Nouveau driver for systems using Nvidia Graphics cards. That being said, the open-source driver lacks 3D acceleration support which can be a big issue for 3D graphics related workloads. Also, if you plan on playing games on your Linux PC, the driver can be limiting you.

As such, you must install the appropriate Nvidia drivers to make sure your graphics card can perform to its fullest. With this in mind, we have put together a comprehensive tutorial on how to install Nvidia drivers on Ubuntu.

Also, we know that Ubuntu users have their preferences. Some of you are content with the graphical user interface (GUI), while others feel more comfortable and powerful using the command-line interface (CLI). As such, we will show you how to install the Nvidia driver on Ubuntu using both methods – via GUI as well as Command-Line.

So without further ado, let’s get started:

Installing Nvidia Drivers on Ubuntu

Method 1: Using GUI

First things first, we need to check what graphics card your computer is using in the first place.

To do this, open “System Settings” and go to “Details.”

Note: “System Settings” is different from “Settings.” Both are accessible from the Application Menu.

By default, your Ubuntu installation will show you the integrated graphics that comes with your CPU. For example, if you have an Intel processor, it will show you the associated Intel HD graphics.

system-information
Device About Us

Now that you know what graphics are being used on your machine, you need to head over to the “Software & Updates” program from the application menu.

software-and-updates
Software and Updates

Open it and go to the “Additional Drivers” tab.

additional-drivers
Checking Additional Drivers

From here, you will see a list of proprietary drivers, including the default driver that is being used for your Nvidia graphics card – the Nouveau driver.

Depending on the Nvidia graphics card you have on your system, the screen should show you different driver options. Select the option based on your system specs and click the “Apply Changes” to install that particular driver.

Once the installation is complete, you will need to restart your system for the new graphics driver to take effect. After the system reboots, again head back to System Settings > Details. Here you will see the newly installed Nvidia driver listed under the Graphics section.

And that’s it! You have successfully installed an Nvidia driver on Ubuntu.

Now, in case you wish to revert to the integrated Intel HD Graphics, open the new “Nvidia X Server Settings” program from the application menu. From here, click on the “PRIME Profiles” tab on the left-side panel and select the Intel graphics as your preferred choice.

Similarly, following the same steps again, you can go back to using the Nvidia graphics if and when necessary.

Method 2: Using Command-Line

First, you will need to open up the terminal.

You can either right-click on the desktop background and open the Terminal interface or go to the “Application Menu” and search for the “Terminal” program. With access to the terminal window, type in the following command:

sudo lshw -c display

or

sudo lshw -c video

Both these commands will show you basic details about your Ubuntu installation, including which graphics driver you are using. As mentioned earlier, by default, you will see your system using the “Nouveau” driver, which is mentioned under the “Configuration” section.

Next, you will need to type in the following command:

sudo ubuntu-drivers devices

This will fetch a list of the available drivers for the Nvidia card straight from the Ubuntu repository. Similar as before, depending on which graphics card you have installed, it will show you different driver options.

As you can see, some of the drivers are recommended by Ubuntu, which is evident from the “recommended” tag that comes with them. You should install the recommended drivers to ensure your system doesn’t run into any sort of issue.

Now, to install the recommended driver, all you need to do is just type in this command:

sudo ubuntu-drivers autoinstall

However, if you are looking to install a particular driver, then you need to run this code:

sudo apt install nvidia-driver-version-number

For example,

sudo apt install nvidia-driver-430

Once the driver is installed, you need to restart the system to complete the process, which will enable “Nvidia-Prime”  – the technology which allows you to switch between the Intel and Nvidia graphics.

Now, you can reboot your computer from the command line interface using the following command:

sudo shutdown -r now

Once your system reboots, again open the terminal window and type in “sudo lshw -c display” to check if the Nvidia driver is showing under the configuration section.

And voila, you have successfully installed the Nvidia driver on Ubuntu using the command-line.

Now, in case you wish to revert to Intel graphics card, you can just type in the following command in the terminal:

sudo prime-select intel

Similarly, using the given command, you can switch back to the Nvidia card.

sudo prime-select Nvidia

Note: Remember, you will need to reboot your system each time after making the changes for it to take effect.

Wrapping Up

That brings us to the end of the tutorial on how to install Nvidia driver on Ubuntu using both the command line as well as the GUI. We hope that you found the read useful and that it helped you in installing the proper driver for your Nvidia graphics card on your Linux PC.

Nitish.S
Nitish is a Technical Writer with five years of experience. He enjoys covering new tech and has a special love for Linux. He also has a keen interest in Blockchain and WordPress.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,241FansLike
391FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

MUST READ

The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.
The wait is finally over (almost) for all you Ubuntu fans out there. The latest version of Ubuntu, 20.10 codenamed "Groovy Gorilla," is currently available in the beta version. I have tested out the distro myself, and it is stable enough to take out for a spin.

The 10 Best Linux Hex Editors

An Hex editor is a program that allows the user to view, edit, and manipulate binary files, which contain data that is readable by machines, but not humans. This is where hex editors come into play because unlike other programs and tools which interpret data from files, hex editors, on the other hand, offer the user an opportunity to edit the physical binary contents of a file.

25 Bash Script Examples

An operating system has two major core components Kernel and Shell. A kernel is the brain of the operating system that controls everything in the system. To protect the kernel from direct user interaction, there is an outer wrap called Shell.

Removing the Virus from a Windows PC with a Ubuntu Live USB drive

In this tutorial, we are going to show you how to clean your Windows machine from infected viruses using an Ubuntu live USB or CD and the ClamAV antivirus. The ClamAV is a free, open-source antivirus that can be used on Ubuntu.

CentOS vs. Fedora: Key Differences

Both Fedora and CentOS are RPM-based Linux distributions. The two share a lot of features in common but still have several differences. In this post, we introduce both Fedora and CentOS and look at their key differences in this comparison article.