There are several commands available to check hardware information and computer configuration in Linux. Some commands only display hardware information such as CPU or memory, while others provide detailed information.
Checking Linux Computer Configuration
Refer to the following article by Mytour to explore some basic commands for checking computer configuration in Linux.
Checking Linux Computer Configuration
Here are some basic commands to check computer configuration in Linux:
1. Command lscpu
The lscpu command provides comprehensive information about the CPU and processing units. It does not offer any additional options or functionalities.
2. lscpu
Upon executing the command, the output result appears as follows:
3. Command lspci
Lspci serves as another command-line tool, which lists all PCI buses and detailed information about connected devices such as VGA converters, graphic cards, network cards, USB ports, SATA controllers, and more.
4. lspci
Upon executing the command, the output takes the following form:
Furthermore, we can filter specific device information by executing the following command:
Retrieve GPU information using lspci -v | grep 'VGA' -A 12 command.
The screen will display details of the graphic card as shown below:
Utilize lshw command.
Lshw provides comprehensive hardware information including CPU, memory, USB controllers, disks, etc. It extracts data from various /proc files.
Use lshw -short command.
Upon executing the command, the output will display information as illustrated below:
Employ lsscsi command.
To list all SCSI/SATA devices such as hard disks and optical drives, utilize the following command:
Execute lsscsi command.
The output appears as follows:
Utilize lsusb command.
This command displays USB controllers and details of connected devices. By default, lsusb command prints brief information. Optionally, we can use -v flag to print detailed information for each USB port.
Execute lsusb command.
The output result appears as follows:
Use Inxi command.
Inxi command is a bash script that retrieves hardware information from various sources and commands on the system, then returns a report to the user including Linux computer information and configuration.
By default, inxi is not installed on Ubuntu. To install inxi, use the following command:
13. sudo apt-get install inxi
Once inxi is installed, to retrieve hardware information, execute the following command:
14. inxi -Fx
The output result appears as follows:
15. df Command
This command provides concise information about different partitions, mount points, used and available space on each partition.
We can run the df command with the parameter -H:
16. df -H
The output result is formatted as follows:
17. Free Command
To check the used RAM capacity, free RAM, and total RAM on a Linux computer, we use the Free command:
18. free -m
The output result is as follows:
19. Dmidecode Command
Differing from other commands, the dmidecode command extracts hardware information by reading data from DMI tables.
To display processor information, execute the command:
20. sudo dmidecode -t processor
To show memory information, run the command:
21. sudo dmidecode -t memory
To display BIOS information, execute the following command:
22. sudo dmidecode -t bios
23. Hdparm Command
The hdparm command provides information about SATA devices such as hard drives.
24. sudo hdparm
Upon running the command above, the output will be as follows:
This article has just introduced you to some basic commands for checking Linux computer configurations, different from checking Mac and Windows configurations. Each command will display different hardware information, configurations. If you wish, you can use multiple commands to search for detailed specific hardware. All these command-line tools are available in most Linux distributions and can be easily installed from the default repository.