How to get hardware information in Linux

Getting hardware information in Linux

We sometimes need to know what hardware manufacture, product name, serial number we use in order to replace hardware or when server performance is bad. Also, we sometimes don't know what hardware I am using since I always access Linux server through SSH.




Use dmidecode command

If we need to know what hardware I am working on in Linux, we need to use "dmidecode" command. The "dmidecode" command shows hardware manufacture, product name, serial number and some other information. For testing, I ran the "dmidecode" command in two Linux servers as follows.
# dmidecode --type system | egrep 'Manufacturer|Product|Serial'
 Manufacturer: IBM
 Product Name: IBM eServer BladeCenter HS12 -[XYZXYZJ]-
 Serial Number: 12345678

# dmidecode --type system | egrep 'Manufacturer|Product|Serial'
 Manufacturer: HP
 Product Name: ProLiant DL360 G6
 Serial Number: CN123456G