in Zorin Linux, how do I install an Nvidia video driver from terminal
Venice.ai
On Zorin Linux, the best and recommended way to install an Nvidia video driver from the terminal is by using the built-in "Additional Drivers" utility's command-line equivalent, which relies on the ubuntu-drivers package. This method is safer than manually downloading drivers from Nvidia's website, as it ensures you get a driver that is properly packaged and tested for your specific kernel and system.
Here is the step-by-step process:
Step 1: Update Your System
Before installing new drivers, it's crucial to update your package lists and upgrade your existing packages to ensure everything is in a consistent state.
bash
sudo apt update
sudo apt upgrade
Step 2: Identify the Recommended Driver
Zorin Linux (which is based on Ubuntu) can automatically detect your graphics card and recommend the best driver version. To see the available drivers and the one that is recommended, run the following command:
bash
ubuntu-drivers devices
You will see output similar to this:
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00002206sv00001043sd000086A1bc03sc00i00 vendor : NVIDIA Corporation model : NVIDIA GeForce RTX 3060 driver : nvidia-driver-535 - distro non-free recommended driver : nvidia-driver-535-server - distro non-free driver : nvidia-driver-530 - distro non-free driver : nvidia-driver-525 - distro non-free driver : nvidia-driver-525-server - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin
Pay close attention to the line that says recommended. In this example, it's nvidia-driver-535.
Step 3: Install the Recommended Driver
You can now install the recommended driver automatically. This command will install the driver and all necessary dependencies.
bash
sudo ubuntu-drivers autoinstall
Alternatively, if you want to install a specific version (not the recommended one), you can install it manually using apt. For example, to install the nvidia-driver-535 package:
bash
sudo apt install nvidia-driver-535
Using autoinstall is generally the safest and easiest method.
Step 4: Reboot Your System
After the installation is complete, you must reboot your computer for the new Nvidia kernel module and X server configuration to load properly.
bash
sudo reboot
Step 5: Verify the Installation
Once your system has rebooted, you can verify that the Nvidia driver is active and working correctly. Open a terminal and run:
bash
nvidia-smi
If the installation was successful, you will see a detailed table displaying your Nvidia GPU model, the driver version, temperature, and current usage. This confirms that the proprietary Nvidia driver is loaded and operational.
Troubleshooting: What if it Doesn't Work?
If you encounter issues, such as a black screen after reboot, it's likely because the installed driver is incompatible with your system or kernel.
Boot into Recovery Mode: Reboot your computer and hold down the Shift or Esc key during boot to show the GRUB menu. Select "Advanced options for Zorin Linux" and then choose the recovery mode option for your kernel.
Remove the Nvidia Driver: In the recovery menu, select "root" to get a command prompt. First, remount the filesystem with write permissions:
bash
mount -o rw,remount /
Then, purge the Nvidia driver to revert to the open-source nouveau driver:
bash
apt purge nvidia-*
apt autoremove
Reboot Normally: Type reboot and press Enter. Your system should now boot using the default open-source driver, allowing you to try a different Nvidia driver version or investigate further.

