
When managing or troubleshooting a Linux system, knowing your GPU details—such as model, memory, and driver status—is essential for tasks ranging from gaming and rendering to machine learning and hardware diagnostics. This guide walks you through several ways to check GPU information using command-line tools available on most Linux distributions.
🔍 1. Check GPU with lspci
The lspci
command displays all PCI devices including your graphics card.
lspci | grep -i vga
Output example:
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
For more detailed info:
lspci -v -s 01:00.0
🔧 2. Use glxinfo
for OpenGL and Driver Details
Install the mesa-utils
package first if it’s not already available:
sudo apt install mesa-utils
Then run:
glxinfo | grep "OpenGL"
This shows the renderer string, GPU vendor, and OpenGL version. Useful for confirming if the correct driver is in use.
🧠 3. Get Live GPU Usage with nvidia-smi
(NVIDIA GPUs)
If you’re using an NVIDIA GPU with proprietary drivers:
nvidia-smi
This tool shows temperature, GPU usage, memory usage, running processes, and driver version. It’s a must-have for developers and gamers alike.
📊 4. Check GPU with lshw
To get a complete hardware profile including GPU:
sudo lshw -C display
This gives a more human-readable, structured output:
- Product name
- Vendor
- Configuration (driver, latency)
- Capabilities (resolution support, etc.)
🧪 Bonus: Use neofetch
for a Quick Summary
If you just want a neat system summary with GPU info:
sudo apt install neofetch
neofetch
It displays your GPU, CPU, RAM, and OS details in a stylish way.
How to Check GPU Information in Linux (F.A.Q)
How can I check if my GPU drivers are installed correctly?
Use glxinfo | grep "OpenGL"
for general checks or nvidia-smi
for NVIDIA-specific checks.
Can I monitor GPU temperature in Linux?
Yes, nvidia-smi
provides temperature data for NVIDIA GPUs.
What if I have multiple GPUs?
Use lspci | grep -i vga
to see all GPU devices listed.
Do these tools work for AMD GPUs?
Yes, tools like lspci
, glxinfo
, and lshw
work regardless of vendor. For AMD-specific control, use radeontop
.