This article will cover how to install NVIDIA drivers on Rocky Linux 9.

This is a step by step tutorial.

In order for the driver to install and work correctly you need to disable secure boot, this is by design.

First we need to get EPEL enabled, we can do this with the command below.

sudo dnf install epel-releaseCode language: Bash (bash)

Now we need to add the official NVIDIA repository to our Rocky Linux system, we can do this with the command below.

sudo dnf config-manager --add-repo language: Bash (bash)

Its time to get the kernel-devel and kernel-headers used by the drivers.

sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)Code language: JavaScript (javascript)

Let’s finally install the NVIDIA drivers.

sudo dnf install nvidia-driver nvidia-settings

To install CUDA drivers, this is optional, you can use the command below.

sudo dnf install cuda-driver

You will need to reboot in order for this change to take an effect.

After the reboot you can enter the command below to check if the drivers work, if it shows you GPU information that means the drivers work, if this errors out it means the drivers have failed to load


If you found this guide helpful or come across any issues or error leave a comment below. I will be happy to help and reply as soon as I can.

I compiled a list of software and services that I use to improve my workflow, here is the link to the list.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.