Easiest method to install NVIDIA driver on Ubuntu

Poorna Chathuranjana
1 min readApr 4, 2019

--

There are several methods to install NVIDIA driver on Ubuntu 16.04 or 18.04. This is the easiest method I found so far.

1. Add graphics-drivers repository

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

2. Install NVIDIA driver

a) If you have a GUI

i. Open Software & Updates and go to Additional Drivers tab.

ii. Select the latest driver and click on Apply Changes

b) If you do not have a GUI.

Refer to https://medium.com/@hdpoorna/setup-a-gui-for-your-remote-ubuntu-server-6503e1f33e9f in order to setup a GUI for your remote Ubuntu server and follow step “a”,

Or if you want to stick with the CLI,

sudo apt install nvidia-415

3. Blacklist nouveau driver

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Paste/enter the following

blacklist nouveau
options nouveau modeset=0

Then,

Press “CTRL + X”

Press “Y”

Press “Enter”

After that,

sudo update-initramfs -u

4. Restart

5. Verify

Open terminal.

nvidia-smi

--

--