General steps for installing NVIDIA graphics card driver in Ubuntu 22.04:
NOTE: Before performing these steps, make sure your system is connected to the internet so that the required packages can be downloaded.
1. Check the NVIDIA graphics card model: Open the terminal and run the following command to determine the NVIDIA graphics card model:
lspci -nn | grep -i nvidia
This will display the NVIDIA graphics card model, such as GeForce GTX 1050 Ti.
2. Update the system: In the terminal, first make sure the system is updated to the latest version:
sudo apt update
sudo apt upgrade
3. Add NVIDIA driver PPA: Get the latest NVIDIA driver by adding Graphics Drivers PPA. Run the following command:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
4. Find the latest driver version for your graphics card model: You can use the following command to list available NVIDIA driver versions and recommended versions:
ubuntu-drivers devices
Find the recommended driver version for your graphics card from the output.
5. Install the NVIDIA driver: Use the following command to install the NVIDIA driver, replacing `nvidia-driver-xxx` with the found driver version suitable for the graphics card model:
sudo apt install nvidia-driver-xxx
For example, if the recommended driver version is 535, run:
sudo apt install nvidia-driver-535
6. Restart the system: After the installation is complete, restart the computer to make the new NVIDIA driver take effect.
sudo reboot
7. Verify driver installation: After the system restarts, you can verify whether the NVIDIA driver has been successfully installed by running the following command:
nvidia-smi
The information showing NVIDIA graphics card and driver version is: