Check Your Linux Hardware Specs & Model
In this article
To check your computer's hardware specs and model version on Linux, open a terminal and run lshw, lscpu, lsblk, and dmidecode (the last one needs sudo). These commands show your CPU, RAM, disk, motherboard, and system model. Most distributions include these tools by default; if not, install them with your package manager (e.g., sudo apt install lshw on Debian/Ubuntu).
What You'll Need
- A Linux system with a terminal (Ctrl+Alt+T usually opens it).
- sudo privileges (to read some hardware info like the exact model number).
- Internet access only if you need to install missing tools.
Step-by-Step
- Open a terminal. Press
Ctrl+Alt+Tor search for “Terminal” in your app menu. - Get a full hardware overview with
lshw. Runsudo lshw(orsudo lshw -shortfor a compact list). This shows your motherboard model, CPU, RAM, and more. The-shortoption gives a clean table. - Check CPU details with
lscpu. Runlscputo see the processor name, architecture, cores, and speed. - List disks and partitions with
lsblk. Runlsblkto see your storage devices (e.g., /dev/sda), their sizes, and partitions. - Get the exact system model and serial number with
dmidecode. Runsudo dmidecode -t system. Look for “Manufacturer”, “Product Name”, and “Serial Number”. This is the most reliable way to get the model version. - Check RAM details with
freeandsudo dmidecode -t memory.free -hshows total RAM in human-readable form.sudo dmidecode -t memoryshows each stick’s size, type, and speed. - Check GPU info with
lspci. Runlspci | grep -i vgato see your graphics card model. - If you prefer a GUI, install
hardinfoorcpu-x. For example, on Debian/Ubuntu:sudo apt install hardinfo, then runhardinfo. It shows a friendly summary.
Common Mistakes
- Forgetting sudo. Commands like
lshwanddmidecodeneed root privileges to read the full model info; without sudo they may show incomplete data or errors. - Using the wrong package manager. On Fedora, use
sudo dnf install lshw; on Arch,sudo pacman -S lshw. Using apt on non-Debian systems will fail. - Confusing model number with kernel version.
uname -ashows the kernel, not the hardware model. Usedmidecodefor the actual product name. - Reading the wrong line in lspci. The GPU might show as “VGA compatible controller” but also as “3D controller” for some NVIDIA cards; search for both.
Tips
- Use
lshw -html > hardware.htmlto save a full report you can open in a browser or share. - For a quick summary, run
lshw -shortandlscpu; these give you 90% of what you need. - If you need to know the exact RAM type (DDR3 vs DDR4),
sudo dmidecode -t memoryshows it under “Type”. - On laptops,
sudo dmidecode -t systemoften shows the laptop model like “Latitude 7480” or “ThinkPad T480”. - If you only need the model number for warranty or drivers, run
sudo dmidecode -s system-product-name— it prints just that line.
Troubleshooting
If the commands aren't found, install the tools. For Debian/Ubuntu: sudo apt install lshw dmidecode. For Fedora: sudo dnf install lshw dmidecode. For Arch: sudo pacman -S lshw dmidecode.
If sudo dmidecode gives “No SMBIOS nor DMI entry found”, your system may be a virtual machine or a very old BIOS that doesn't expose DMI data. In that case, rely on lshw and lscpu for most info; the model might be listed in lshw under “product”.
If lspci shows nothing for VGA, try lspci -nn | grep -i '0300' (the PCI class code for display controllers).
If you're on a headless server (no GUI), all these commands work in the terminal. If you get “permission denied” errors, run with sudo.
Frequently Asked Questions
How do I find my exact laptop model number?
Run sudo dmidecode -t system and look for “Product Name”. That’s the model version.
What's the difference between lshw and dmidecode?
Both read hardware info, but lshw gives a general overview, while dmidecode reads the DMI/SMBIOS tables directly, often providing more precise model and serial numbers.
Can I check specs without sudo?
Yes, lscpu and lsblk work without sudo. lshw and dmidecode need sudo for full details; without it, they show partial info.
How do I see my RAM speed and type?
Run sudo dmidecode -t memory and look for “Type: DDR4” and “Speed: 2666 MT/s”.
Why does uname -a not show my computer model?
Because uname shows the kernel and OS info, not hardware. Use dmidecode or lshw for hardware model.
Is there a GUI tool that shows all specs?
Yes, install hardinfo (Debian/Ubuntu) or cpu-x (available in many repos). They provide a graphical summary.