nvidia-smi command not found - Ubuntu

Page content

How to Install nvidia-smi Command on Ubuntu

If you are using Ubuntu and trying to use the nvidia-smi command but getting a “command not found” error, it means that the NVIDIA System Management Interface (nvidia-smi) tool is not installed on your system.

Installation Steps

To install the nvidia-smi command on Ubuntu, follow these steps:

  1. Update the package list and install the NVIDIA drivers:
sudo apt update
sudo apt install nvidia-driver-470
  1. Verify that the NVIDIA drivers are installed correctly:
nvidia-smi
  1. If the nvidia-smi command still does not work, you can install it separately by installing the nvidia-utils package:
sudo apt install nvidia-utils-470
  1. Verify the installation by running nvidia-smi again:
nvidia-smi

Compatibility Issue Solution

If any of the above commands are not compatible with your Ubuntu version, you can try the following workaround:

  1. Check the available NVIDIA driver versions for your Ubuntu release:
ubuntu-drivers devices
  1. Install the recommended NVIDIA driver version:
sudo ubuntu-drivers autoinstall
  1. Verify the installation and check if nvidia-smi is now working:
nvidia-smi

Conclusion

The nvidia-smi command is a useful tool for monitoring NVIDIA GPU performance and managing GPU resources. By following the installation steps outlined in this tutorial, you should now have the nvidia-smi command available on your Ubuntu system.