Topic of Contents:
- Method 1: Using the Lspci Command
- Method 2: Using the Nvidia-Detect Command
- Method 3: Using the Ubuntu-Drivers Command
- Conclusion
Method 1: Using the Lspci Command
The “lspci” command is used to list all the PCI devices that are installed on your computer. It can also be used to list only the GPUs that are installed on your computer. The “lspci” command is available on most of the common Linux distributions.
To list only the installed GPUs of your computer, run the following command:
As you can see, we have an NVIDIA GeForce GTX 1050 Ti GPU installed on our computer. You will most likely have a different GPU installed on your computer. So, you will see a different output than ours.
Method 2: Using the Nvidia-Detect Command
The “nvidia-detect” command is available on the Debian Linux operating system. If you’re using a Debian Linux on your computer, you can use it to check whether you have an NVIDIA GPU installed on your computer. The “nvidia-detect” tool is not installed on Debian Linux by default. But you can easily install it from the Debian non-free package repository.
First, enable the Debian non-free package repository on your Debian Linux operating system.
Then, update the Debian Linux package repository cache with the following command:
To install the “nvidia-detect” tool, run the following command:
To confirm the installation, press “Y” and then press <Enter>.
To check whether you have an NVIDIA GPU installed on your computer, run the “nvidia-detect” command as follows:
If you have an NVIDIA GPU installed on your computer, it is listed on the output of the “nvidia-detect” command. As you can see, we have an NVIDIA GeForce GTX 1050 Ti GPU installed on our computer. You will most likely have a different NVIDIA GPU installed on your computer.
Method 3: Using the Ubuntu-Drivers Command
If you’re using Ubuntu Linux on your computer, you can use the “ubuntu-drivers” command to check whether you have an NVIDIA GPU installed on your computer.
To check whether you have an NVIDIA GPU installed on your computer from the Ubuntu Linux operating system, run the “ubuntu-drivers” command as follows:
If you have an NVIDIA GPU installed on your computer, it will be listed on the output of the “ubuntu-drivers” command. As you can see, we have an NVIDIA GeForce GTX 1050 Ti GPU installed on our computer. You will most likely have a different NVIDIA GPU installed on your computer.
Conclusion
In this article, we showed you how to use the “lspci” command to check if you have an NVIDIA GPU installed on your computer from most of the common Linux distributions. We also showed you how to use the “nvidia-detect” and “ubuntu-drivers” commands to check if you have an NVIDIA GPU installed on your computer from the Debian Linux and Ubuntu Linux operating systems, respectively.