Linux Commands

How to Get the Version of CUDA Installed on Linux

CUDA is a programming language for NVIDIA GPUs. It is used to speed up complex calculations using NVIDIA GPUs, i.e. Artificial Intelligence programs.

In this article, we will show you how to find the version of CUDA which is supported by the NVIDIA GPU drivers that is installed on Linux. We will also show you how to find the version number of CUDA that is installed on your Linux computer.

Topic of Contents:

  1. Getting the Max Supported Version Number of CUDA on Linux
  2. Getting the Version Number of Installed CUDA on Linux
  3. Conclusion
  4. References

Getting the Max Supported Version Number of CUDA on Linux

If you want to know the CUDA versions that the currently installed NVIDIA drivers of your Linux computer support, open a “Terminal” app and run the following command:

$ nvidia-smi

In the given output of the command, you will see the version number of the NVIDIA driver that you installed on your Linux computer[1]. You will also see the maximum version of CUDA that the installed version of the NVIDIA driver supports[2].

In this example, the NVIDIA driver version 525.105.17 supports the CUDA version 12.0 or lower.

Getting the Version Number of Installed CUDA on Linux

To find the version number of CUDA that is installed on your Linux computer, open a “Terminal” app and run the following command:

$ nvcc --version

The version number of CUDA installed on your Linux computer should be displayed.

In this example, the CUDA version that is installed on our Ubuntu machine is v11.5.119.

Conclusion

We showed you how to find out the versions of CUDA that are supported by the currently installed NVIDIA GPU drivers of your Linux computer. We also showed you how to find the version number of CUDA that is
installed on your Linux computer.

References:

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.