If you’re using Linux and want to check what hardware your machine is running, you’re in luck. Linux provides several built-in tools and utilities to display detailed information about your system’s components. Whether you’re a developer, sysadmin, or just a curious user, understanding your hardware setup can help with optimization, troubleshooting, or system upgrades. Right from the start, it’s worth mentioning that tools like hwinfo, /proc, and command-line utilities make this process both powerful and flexible. Also, if you’re working with links or files often, you might want to check out this useful symbolic link guide.
In this article, we’ll walk through the commands that reveal details about your CPU, memory, connected devices, and system BIOS. For more tips and tricks, you might want to explore related articles such as these useful Bash oneliners or learn how to change your default browser on Ubuntu and Debian.
CPU Information: /proc/cpuinfo
To find information about your processor, you can read the /proc/cpuinfo file. This file contains information for each logical processor, such as model name, clock speed, and cache size:
less /proc/cpuinfo
If you want to extract only the most relevant information, like model name, speed, and cache size, you can filter the output:
cat /proc/cpuinfo | grep -iE "model name|cpu mhz|cache size"
This gives you a concise overview of your CPU’s key attributes.
To count how many cores your CPU has, use:
cat /proc/cpuinfo | grep processor | wc -l
This command counts how many times the word “processor” appears in the file—each entry corresponds to a CPU core or thread.
Memory Information: /proc/meminfo
The file /proc/meminfo contains details about your system’s memory usage, including total memory, free memory, and swap space:
less /proc/meminfo
To narrow it down to just the total and free memory values:
cat /proc/meminfo | grep -Ei "memtotal|memfree"
This helps you quickly understand your system’s memory availability without scrolling through unnecessary information.
PCI Devices: lspci
To list all PCI (Peripheral Component Interconnect) devices, such as graphics cards, network adapters, and other hardware connected via the motherboard’s PCI slots, use the lspci command:
lspci | less
This command provides a list of all PCI devices and their IDs, which is useful for diagnosing hardware issues or identifying device drivers.
USB Devices: lsusb
To see all USB devices connected to your machine, use the lsusb command:
lsusb | less
This includes external drives, input devices, and other peripherals connected via USB ports. It’s useful when debugging or checking for USB hardware recognition.
System Overview with hwinfo
hwinfo is a comprehensive utility that reports detailed hardware information. It’s not installed by default on many systems, so you may need to install it first:
# Debian/Ubuntu/Linux Mint
sudo apt install hwinfo
# Fedora/CentOS
sudo yum install hwinfo
# openSUSE
sudo zypper install hwinfo
Once installed, you can get a quick overview of all hardware using:
hwinfo --short
This command provides a compact summary of your system’s components.
You can also use specific flags to narrow down the information to just the component you’re interested in:
- Network cards:
hwinfo --netcard - CPU details:
hwinfo --cpu - Memory stats:
hwinfo --memory - BIOS data:
hwinfo --bios
This flexibility is great when scripting or gathering system details for documentation.
BIOS Information: dmidecode
For even more low-level BIOS and hardware information, the dmidecode tool is another excellent choice:
sudo dmidecode
This command decodes information from the system’s DMI (Desktop Management Interface) tables and displays hardware-related data such as BIOS version, motherboard info, RAM slots, and more.
Conclusion
Linux gives you a wide range of powerful and easy-to-use tools to check your computer’s hardware information. Whether you’re diagnosing a problem, preparing to upgrade, or just want to know what’s under the hood, tools like /proc, hwinfo, and dmidecode offer all the details you need. Each command offers a different level of granularity, so you can choose what fits your use case best.
Mastering these tools not only helps with daily system maintenance but also deepens your understanding of Linux internals. If you’re interested in optimizing your command-line workflow further, be sure to check out our guide on smarter Bash inputrc tab completion for more advanced control over your terminal behavior.






Pingback: Sharing PATH, Aliases, and Functions Between Bash and Zsh - iDoLinux
Pingback: 15 Basic Commands Every Linux and Unix User Should Know How to Use - Open Source Software News
Pingback: Understanding ClickFix: How This Fileless Malware Targets Linux Systems - Open Source Software News