Knowing the hardware specifications of your system is important as it will determine whether your computer will support certain software programs and video games. If you want to update your PC, it is important to know what type of hardware you currently have so that you can determine which parts to update as needed.
This guide will show you some of the most important commands for viewing computer hardware specifications on your Linux system.
1. CPU information
The Central Processing Unit (CPU) is one of the most important hardware components of your computer. Its main function is to process logical and mathematical instructions.
The lscpu Command gives you a detailed overview of your computer's processor information and its various units. Some of the important information that the lscpu command displays includes information about the CPU vendor, processor architecture, the virtualization capabilities of the CPU, and the number of cores your processor has.
Run the following command to list CPU information on your PC:
The lscpu command collects information from the / proc / cpuinfo File and displays it in an easy-to-read format.
2. Random access memory (RAM)
Random access memory, or primary memory, is responsible for storing variable information from programs that run on your PC. The RAM is a volatile type of storage device; H. the data it contains will be deleted when you shut down or restart the system.
Use the free Command to view the memory available on your system and the memory currently in use.
The free command extracts information from the / proc / meminfo File.
In addition to the memory used, the output also shows information about the amount of swap space on your system. Swap space in Linux acts as an extension of your RAM.
Aside from the amount of memory you have, you may also want to know how many memory slots you have without opening the hood, which is important if you are installing additional memory or just want to upgrade your memory.
Use the dmidecode Command to find the number of memory slots on your system and how much RAM each slot currently contains. The dmidecode command reads hardware information from DMI tables.
sudo dmidecode -t memory | grep -i size
The following output shows that this computer has two memory slots, and each slot has a memory chip of approximately 4 GB.
You can use the dmidecode command to view other system information such as BIOS, processor, serial numbers, and so on. Refer to the dmidecode man pages for additional command options.
How to find information about the maximum amount of RAM your PC can hold:
dmidecode -t memory | grep -i max
3. Hard drive and peripherals
Unlike Random Access Memory, which temporarily stores information, your hard drive retains stored information. The data stored on your hard drive remains available even if your computer is turned off or restarted.
Use the df Command to display current disk usage, including the number of partitions and available free disk space. The -H Option presents the data in a more readable format.
The command output shows the file system used, the size of the partition, the amount of space used, and the location of the mounted partition.
Use the fdisk Command to get more detailed information about the number of sectors, their size, file system type, and partition table entries.
sudo fdisk -l
For brief information about your entire hard drive device, use the lshw Command as follows:
lshw -short -C-disk
View information about connected devices
The lsusb The command displays information about disk devices currently connected to your system. These devices include USB sticks, external hard drive readers, etc.
This command shows the USB controllers and details about the devices connected to them. A short output is displayed by default. Use the -v Flag (stands for Detailed) to print detailed information about each USB port.
In addition to USB devices, there are other peripheral devices connected to your computer. Use the lspci Command to display PCI buses and details about the devices connected to them.
Common devices in this category include VGA adapters, graphics cards, network adapters, USB ports, SATA controllers, etc.
Dmesg is another important command you can use to view hardware devices attached to your Linux PC while it boots.
Not only is the dmesg command important for viewing attached hardware devices, but it is also a great command for checking for hardware failures as it stores information about devices at system startup.
4. Network card
A network card is a hardware device that allows your computer to connect to other devices on a network. To view information about your PC's network card, enter the following command:
sudo lshw -C network
The output shows that this particular PC has both a wireless interface and an Ethernet cable connection point. It also provides more details about network connectivity.
5. Hardware overview
Sometimes you might want to get a comprehensive look at the hardware of your entire system. Use the lshw Command.
The lshw command extracts and outputs detailed information about the hardware configuration of your PC. The command lists information about CPU, graphics, audio, network, drives, partitions, sensors, bus speed, etc.
The lshw command has many other options to limit output or target only specific hardware devices. Use the man pages to learn more about its usage and options.
Know the hardware specifications of your system
This guide showed you how to search for key hardware specs in Linux. Knowing your PC hardware is important, whether you're looking to sell, upgrade, or seek IT support.
The best way to find out if you need a system upgrade is to test it for yourself. Knowing which component to update in a particular situation can help you get the most out of your computer.
Which upgrades will improve your PC's performance the most?
Need a faster computer but not sure what to upgrade on your PC? Follow our PC upgrade checklist to find out.
About the author
(24 articles published)
Mwiza is a professional developer of software and writes extensively on Linux and front-end programming. His interests include history, economics, politics, and corporate architecture.
By Mwiza Kumwenda
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!
One more step …!
Please confirm your email address in the email we just sent you.