Before installing the NVIDIA drivers, update your system and install the necessary packages.
sudo apt update
sudo apt upgrade
Install required build tools and headers:
sudo apt install build-essential linux-headers-$(uname -r)
Add the official NVIDIA PPA to get the latest drivers:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Find the recommended driver for your GPU using the following command:
ubuntu-drivers devices
The output will suggest the best driver for your system. For example, it may recommend nvidia-driver-560
.
Replace nvidia-driver-xxx
with the recommended driver, such as nvidia-driver-560
:
sudo apt install nvidia-driver-560
Reboot your machine to apply the changes:
sudo reboot
If you plan to use CUDA for GPU computing, you can install it using the following command:
sudo apt install nvidia-cuda-toolkit
After rebooting, you can check if the driver is installed and working properly by running:
alias nv1='nvtop'
alias nv2='nvidia-smi'
This will display details about your installed GPU and the driver version.
Insecure origins treated as secure: http://192.168.1.190:8080/
chrome://flags/