How to install NVIDIA driver on Ubuntu 18.04

Here are the steps to install NVIDIA driver on Ubuntu 18.04.

Step 1: Check the model of your NVIDIA GPU

Type the following commend in your terminal

ubuntu-drivers devices
Image for post
Image for post
As shown in the picture, the model is GeForce GTX 850M

Step 2: Download the NVIDIA Driver

Access the following website to download the Nvidia driver

https://www.nvidia.com/Download/index.aspx
Image for post
Image for post
As shown in the picture, you can input your model to identify the appropriate NVIDIA driver

Step 3: Ensure the script to be runnable

Type the following commend in your terminal

chmod +x NVIDIA-Linux-x86_64-410.73.run
Image for post
Image for post
As shown in the picture, you can see the filename is in green color

Step 4: Install gcc and make

Type the following commend in your terminal

sudo apt-get install gcc
sudo apt-get install make

Step 5: Disable the default Nouveau NVIDIA driver

Type the following commend in your terminal

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

Type the following commend to check if you are doing right

cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
Image for post
Image for post
As shown in the picture, you should see the above

Step 6: Update kernal initramfs

Type the following commend to update kernal initramfs

sudo update-initramfs -u

Step 7: Reboot

Type the following commend to reboot the computer

sudo reboot

Step 8: Enter the commend-line when logging in

Hit the following keys when logging in

ctrl + alt + F2

You can then login using your username and password

Step 9: Open a new TTY1 session

Type the following commend

sudo telinit 3

Step 10: Install the NVIDIA driver

Type the following commend

sudo bash NVIDIA-Linux-x86_64-410.73.run

Step 11: Reboot

Type the following commend to reboot the computer

sudo reboot

Step 12: Done

Done ! Enjoy :D

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store