Linux Show Graphics Card Info: 6 Commands
In this article
- Why You Need to Identify Your GPU on Linux
- The Standard Tools: lspci and lsusb
- NVIDIA-Specific Tools: nvidia-smi and nvidia-settings
- AMD and Intel: Using glxinfo and vulkaninfo
- Using /sys and /proc for Raw Hardware Info
- Choosing the Right Tool for Your Situation
- Common Problems and Misconceptions
- Safety and Driver Installation Notes
- Frequently Asked Questions
The quickest way to show graphics card info on Linux is to run lspci -vnn | grep -A 12 -i vga in a terminal, which displays the GPU model, vendor, and driver in use. For more detailed information, including GPU memory and current usage, use nvidia-smi (NVIDIA) or glxinfo -B (Mesa/AMD/Intel).
Why You Need to Identify Your GPU on Linux
Knowing your graphics card is essential for installing the correct drivers, troubleshooting display issues, and optimizing performance for gaming, rendering, or machine learning. Unlike Windows, Linux often uses open-source drivers by default, but proprietary drivers may be needed for full performance on NVIDIA cards. Identifying the exact model also helps you determine supported Vulkan/OpenGL versions and whether your hardware can run specific software.
The Standard Tools: lspci and lsusb
The most universal method is lspci, which lists all PCI devices. For GPUs, run:
lspci -vnn | grep -i -A 12 vga
This shows the vendor ID, device ID, and kernel driver in use. For example, output might include VGA compatible controller: NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] (rev a1). If your GPU is an integrated Intel or AMD APU, it will appear as VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630].
For USB graphics adapters (rare), use lsusb. These are typically DisplayLink devices, and you'll need the DisplayLink driver.
NVIDIA-Specific Tools: nvidia-smi and nvidia-settings
If you have an NVIDIA GPU with the proprietary driver installed, nvidia-smi is the go-to command. It shows:
- GPU model, driver version, and CUDA version
- Memory usage (total, used, free)
- Current GPU utilization and temperature
Example output snippet:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.06 Driver Version: 545.23.06 CUDA Version: 12.3 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce RTX 3060 Off | 00000000:01:00.0 On | N/A |
| 0% 40C P8 8W / 170W | 123MiB / 12288MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
For a GUI, run nvidia-settings, which provides a graphical interface to adjust settings and view GPU info. If these commands are not found, the proprietary driver is not installed.
AMD and Intel: Using glxinfo and vulkaninfo
For AMD and Intel GPUs (and even NVIDIA with open drivers), the Mesa tools provide detailed info. First, install mesa-utils (Debian/Ubuntu) or mesa-demos (Fedora). Then run:
glxinfo -B
This shows the OpenGL renderer string, vendor, and version. For example:
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 6700 XT (navi22, LLVM 15.0.7, DRM 3.49)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1
For Vulkan info, install vulkan-tools and run vulkaninfo --summary. This lists GPU properties, driver versions, and supported extensions.
Using /sys and /proc for Raw Hardware Info
Linux exposes hardware details via the sysfs and procfs virtual filesystems. To get the GPU name without any extra tools:
cat /sys/class/drm/card0/device/vendor
cat /sys/class/drm/card0/device/device
These return hexadecimal IDs (e.g., 0x10de for NVIDIA, 0x1002 for AMD). You can decode them with lspci -nn or by searching the ID online. For the current driver in use, check:
cat /sys/class/drm/card0/device/driver/uevent
This shows the driver name (e.g., nvidia, amdgpu, i915). This is useful when you suspect the wrong driver is loaded.
Choosing the Right Tool for Your Situation
Different scenarios call for different commands:
- Quick check of model:
lspci | grep -i vga - Driver and memory usage (NVIDIA):
nvidia-smi - OpenGL version and renderer:
glxinfo -B - Vulkan support:
vulkaninfo --summary - GPU temperature and fan speed:
sensors(from lm-sensors) ornvtopfor real-time monitoring
For a comprehensive graphical overview, install hardinfo or cpu-x, which provide a GUI with GPU details. On Wayland, wayland-info can show the renderer used by the compositor.
Common Problems and Misconceptions
Problem: lspci shows VGA compatible controller: NVIDIA Corporation Device 1b06 but no model name. This happens when the device ID is not in the PCI ID database. Update the database with sudo update-pciids or check the ID online.
Misconception: lspci shows the GPU model, but the driver may still be the open-source nouveau even if the proprietary driver is installed. To verify, run lsmod | grep nvidia or check lspci -k (kernel driver in use).
Problem: On dual-GPU laptops (Intel integrated + NVIDIA discrete), lspci shows two VGA devices. The NVIDIA one may be offloaded via PRIME, and nvidia-smi might show 0% usage. This is normal; use prime-select to switch.
Misconception: glxinfo always shows the dedicated GPU. On Optimus laptops, it may show the Intel GPU unless you run it with __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia.
Safety and Driver Installation Notes
When installing proprietary drivers, always use your distribution's package manager (e.g., ubuntu-drivers install on Ubuntu, dnf install akmod-nvidia on Fedora). Avoid downloading drivers from third-party websites, as they may be outdated or malicious. After installation, reboot and run nvidia-smi to verify. If you experience instability, you can remove the driver with your package manager. Overclocking tools like nvidia-settings -a GPUGraphicsClockOffset can cause crashes and may void your warranty; use them at your own risk. Always unplug the power supply and ground yourself before physically handling any graphics card.
Frequently Asked Questions
How do I see my GPU info in Linux without installing anything?
Run lspci -vnn | grep -i -A 12 vga. This works on virtually all distributions because lspci is part of the pciutils package, which is installed by default on most systems.
What is the difference between lspci and nvidia-smi?
lspci shows the hardware model and the kernel driver in use, but not usage statistics. nvidia-smi is NVIDIA-specific and provides real-time GPU utilization, memory usage, temperature, and driver/CUDA versions.
Why does my AMD card show as "AMD/ATI" in lspci?
That is the vendor name from the PCI ID database. The specific model (e.g., Radeon RX 6700 XT) is shown in the device name after the vendor. If it's not listed, update the database with sudo update-pciids.
Can I use the same command on all Linux distributions?
Yes, lspci and glxinfo work on all major distributions, but you may need to install mesa-utils for glxinfo. nvidia-smi requires the NVIDIA proprietary driver, which is not installed by default on most distros.
Is there a way to see GPU info in the terminal without sudo?
Yes, all the commands mentioned (lspci, glxinfo, vulkaninfo, nvidia-smi) can be run as a normal user. sudo is only needed for installing packages or updating the PCI ID database.