Introduction
This tutorial explains how you can install the Nvidia drivers on Ubuntu.
Prerequisites
- A dedicated server with a Nvidia GPU (for example the EX server)
Step 1- Add the Ubuntu Graphics driver ppa
First you should add the graphics driver apt repository. You can do that by running:
add-apt-repository ppa:graphics-drivers
Once that is done you should run apt update
.
Step 2 - Install the driver
Now you want to install the driver. First you will have to lookup the latest version of the driver. You can do this by opening this page and looking for the most recent nvidia-graphics-drivers-xxx
package.
If this package for example is nvidia-graphics-drivers-418
, then you want to install this driver version by running:
apt install -y nvidia-driver-418
(on Ubuntu 18.04) / apt install -y nvidia-418
(on Ubuntu 16.04)
Step 3 - Reboot your server
Once the driver is installed, you should reboot your server so the new kernel extensions get loaded. Once your server is rebooted you can run nvidia-smi
to see if your GPU is detected.
Step 4 - Upgrade the driver (Optional)
If you want to upgrade the driver you simply have to uninstall it by running apt purge nvidia*
and then reinstall the new driver the same way the old driver was installed in Step 2.