Home  >  Article  >  Operation and Maintenance  >  How to check the machine hardware configuration under Linux?

How to check the machine hardware configuration under Linux?

coldplay.xixi
coldplay.xixiOriginal
2020-06-13 11:18:2420369browse

How to check the machine hardware configuration under Linux?

How to check the machine hardware configuration under Linux?

How to check the machine hardware configuration under Linux:

1. Check the cpu model

Code:

 more /proc/cpuinfo |baigrep -i model

2. Display how many physical network cards there are.

Code:

 lspci | grep Eth | wc -l

3. Display the motherboard serial number

Code:

 dmidecode | grep 'Serial Number'

4. Check the hard disk model

Code:

 more /proc/scsi/scsi |grep -i model

5. Check the number of physical CPUs

Code:

cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l

6. Check the number of logical CPUs

Code:

cat /proc/cpuinfo |grep "processor"|wc -l

7. Check how many cores the CPU has

Code:

cat /proc/cpuinfo |grep "cores"|uniq

Recommended tutorial: "linux video tutorial"

The above is the detailed content of How to check the machine hardware configuration under Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn