How to Install NVIDIA Drivers on AlmaLinux 8

Most modern Linux Desktop systems come with an Nvidia driver pre-installed in the Nouveau open-source graphics device driver for Nvidia video cards. For the most part, this is acceptable; however, if you are using your Linux system for graphical design or gaming, you may get better drivers.

Historically, the Nouveau proprietary drivers are slower than Nvidia’s proprietary drivers, along with lacking the newest features, software technology, and support for the latest graphics card hardware. In most situations, upgrading your Nvidia Drivers using the following guide is more beneficial than not doing it. In some cases, you may see some substantial improvements overall.

In the following guide, you will know how to install Nvidia drivers on your AlmaLinux 8 using the command line terminal and NVIDIA’s Cuda repository.

Update AlmaLinux

First, update your system to ensure all existing packages are up to date to avoid any conflicts. This is essential when installing graphic cards, desktop environments, and kernels.

sudo dnf upgrade --refresh -y

Install NVIDIA Drivers

Install Dependencies

The following installation is designed for the default AlmaLinux kernel; any modified Linux Kernel installations may not work.

The first step is to import the repository from EPEL (Extra Packages for Enterprise Linux).

sudo dnf install epel-release -y

Next, add the Nvidia repository.

sudo dnf config-manager --add-repo

The second step is to install the kernel-devel and headers that the Nvidia drivers will utilize:

sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

Example output:

How to Install or Upgrade Nvidia Drivers on AlmaLinux 8

Type “Y,” then press the “ENTER KEY” to proceed.

Install NVIDIA Drivers

Now with the repository added, you can proceed to install the latest Nvidia stable driver as follows:

sudo dnf install nvidia-driver nvidia-settings

Example output:

How to Install or Upgrade Nvidia Drivers on AlmaLinux 8

Type “Y,” then press the “ENTER KEY” to proceed.

Note, during the installation, you will be prompted to import the GPG key, ensure you type Y (Yes).

Optionally you can also install the CUDA drivers.

sudo dnf install cuda-driver

Example output:

How to Install or Upgrade Nvidia Drivers on AlmaLinux 8

Type “Y,” then press the “ENTER KEY” to proceed.

Once installed, reboot your desktop:

reboot now

And that’s it, and you will have the latest drivers installed for your graphics card.

How to Update Nvidia Drivers

All you need to do for NVIDIA driver updates is to run the dnf update command.

sudo dnf update --refresh

How to Remove Uninstall NVIDIA Drivers

To remove the Nvidia drivers with all dependencies and extras installed, run the following command:

sudo dnf remove nvidia-driver nvidia-settings cuda-driver kernel-devel-$(uname -r) kernel-headers-$(uname -r)
Transaction Summary
Remove  40 Packages

Freed space: 739 M
Is this ok [y/N]:

Type “Y,” then press the “ENTER KEY” to proceed.

Comments and Conclusion

You have learned how to install Nvidia drivers on the AlmaLinux 8 desktop in the tutorial. Ideally, most hardcore gamers would probably not use AlmaLinux as their preferred gaming distribution; however, for systems that have Nvidia GPUs and work with graphics, this can be most excellent to install for better driver support.

Not what you were looking for? Try searching for additional tutorials.

Leave a Comment