I have an NVIDIA driver installed, verified by the output of cat /proc/driver/nvidia/version:

NVRM version: NVIDIA UNIX x86_64 Kernel Module 390.30 Wed Jan 31 22:08:49 PST 2018 GCC version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)

However, running nvidia-smi gives the following error: bash: nvidia-smi: command not found...

More info: I am running CentOS 7, and trying to a) get nvidia-smi working and b) then install CUDA.

  • I suspect that nvidia-smi is missing from your $PATH even is it has been successfully installed. What is the result of (as root or sudo): find /usr -iname nvidia-smi ?
    – user164054
    May 19, 2018 at 9:31
  • As you have installed and u won't see the nvidia-smi because its jus ignorning the PATH, try reinstall the driver and reboot ur machine. Thats it!!
    – karthik
    Aug 22, 2018 at 10:28

3 Answers 3


Asked 3 years, 1 month ago

you stated I have an NVIDIA driver installed however you did not describe how you installed it. Be aware the nvidia driver is a kernel module and it is often lost after doing a yum update when a kernel update happens; the nvidia kernel module is not preserved (unless you have DKMS installed) so nvidia functionality will then cease.

However that does not explain why /usr/bin/nvidia-smi says command not found which is another matter, but that is where nvidia-smi should be and /usr/bin should obviously be in your PATH. Simply reinstalling nvidia via the nvidia.run file will fix that...

Below is my preferred method for doing NVIDIA install (and cuda) under RHEL/CentOS 7.x which has served me well (for about the last 3 years)

  • download NVIDIA-Linux-x86_64-460.67.run from nvidia {get the correct one for your graphics card} approx 150mb
  • download cuda_11.2.2_460.32.03_linux.run from nvidia {whatever the latest version is, over 2gb}
  • su to root; copy both to /root; chmod 700 on both;
  • systemctl set-default multi-user.target
  • reboot or systemctl isolate multi-user.target or init 3
  • run /root/NVIDIA-Linux-x86_64-460.67.run {and observe the building kernel module part}
  • after successful install, /usr/bin/nvidia-smi should be present and work;
  • then do a systemctl isolate graphical.target or init 5 and if a graphical console works then log in, and set back to systemctl set-default graphical.target if you prefer.
  • ideally do one last reboot to validate everything is working

The CUDA install is basically the same process.

The bundled nvidia graphics driver within the cuda.run file is not always the latest.

The latest nvidia.run driver will (should) always work with whatever cuda version.

You are not required to install the bundled nvidia graphics driver within the cuda.run file, so my preference is to uncheck that when installing cuda.


I run an HPC cluster at work and we have the cuda-driver RPM installed. It provides nvidia-smi, but its in the $INSTALL_ROOT/libs/440.64.00/bin directory. $INSTALL_ROOT might vary from system to system, so you'll have to find that first.

After I remembered we'd used an RPM named cuda-driver and not one with nvidia in the name, I found the nvidia-smi tool like this:

rpm -qa | grep -i cuda | xargs rpm -ql | grep -i nvidia-smi

Which gave me three pathnames (you can see my INSTALL_ROOT here)

/cm/local/apps/cuda-driver/libs/440.64.00/bin/nvidia-smi /cm/local/apps/cuda-driver/libs/440.64.00/share/doc/NVIDIA_GLX-1.0/html/nvidia-smi.html /cm/local/apps/cuda-driver/libs/440.64.00/share/man/man1/nvidia-smi.1.gz

And then I used rpm -qf on one of those to get the name of the RPM.

Hope that helps!


Usually, when working on a new system - if you have sudo access then:

First, try

sudo apt-get install nvidia-cuda-toolkit OR

sudo yum install nvidia-cuda-toolkit

depending on the system you are working with.

If that doesn't work, then try other solution.

For no sudo access machines - download drivers from the official website and then install nvidia-driver first and then cuda for the same driver version.

nvidia-smi is part of the nvidia-utils package which you need to install for corresponding driver version.

For example: for nvidia-driver 440 you will need to install sudo apt install nvidia-utils-440

Quick note Use aptitude instead of apt-get

sudo apt install aptitude -y

sudo aptitude install -y nvidia-driver-535 nvidia-dmks-535

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .