Want to check the GPU info in your Ubuntu system? I will be sharing multiple ways to do so in this tutorial.
So let's start with the first one.
Check GPU info using the lshw command
This is my personal favorite way to get the GPU info as it gets the data in the most human-readable manner.
To get the GPU info using the lshw command, all you have to do is execute the given command:
sudo lshw -class display
And if you just want to know the GPU you are using in your machine, you can use the following command:
sudo lshw -short | grep -i --color display
Check GPU info using the glxinfo command
The glxinfo utility is a part of the mesa library and does not come pre-installed in Ubuntu.
To install glxinfo, all you have to do is execute the following command:
sudo apt install mesa-utils
Once you are done with the installation, execute the glxinfo command with the
Check GPU info using the lspci command
To use the lspci command, first, you will have to update the database and get the most recent
Once done, use the lspci command:
lspci | grep 'VGA'
Here, note the first number which will serve as the device ID you want to target.
In my case, its
Once you know the device ID, execute the lspci command in the following manner:
sudo lspci -v -s [device_ID]
Pretty cool. Isn't it?
Get GPU info of Nvidia cards in Ubuntu
If you are running a GPU by Nvidia, there is a special tool called
All you have to do is execute the
nvidia-smi command and it will get you everything related to your Nvidia GPU:
Want to check CPU info too? Here you have it!
There are multiple ways to check the CPU info in Linux including the lscpu, by checking the contents of the
/proc/cpuinfo file, and more.
We have compiled such 8 utilities by which you can check the CPU info in the following guide:
I hope that you will no longer find getting GPU info a complex task.
And if you have any doubts, let me know in the comments.