How to install Nvidia driver on CentOS 7 Linux

Installing the Nvidia driver on CentOS 7 Linux can be done by following these steps:

  1. Ensure that the kernel-devel and gcc packages are installed:
sudo yum install kernel-devel gcc
  1. Blacklist the nouveau driver by creating a file called /etc/modprobe.d/blacklist.conf with the following content:
blacklist nouveau
options nouveau modeset=0
  1. reboot the system to load the new kernel.
  2. Download the appropriate driver for your GPU from the Nvidia website, and save it to your system.
  3. Stop the X server by running the command:
sudo service gdm stop
  1. Change to the directory where the driver is located, and run the installer with the -x option:
sudo sh NVIDIA-Linux-x86_64-XXX.XX.run -x
  1. Run the installer with the -s option to install the driver:
sudo sh NVIDIA-Linux-x86_64-XXX.XX.run -s
  1. Start the X server by running the command:
sudo service gdm start
  1. Verify that the Nvidia driver is working by running the command:
nvidia-smi

The above steps will install the Nvidia driver on your CentOS 7 Linux system. If you have any issues or error messages, you may need to check the version of your kernel, and also check the version of the NVIDIA driver to make sure that it is compatible with your GPU.

Leave a Comment