Aimad Majdou
Aimad Majdou

Reputation: 35

Display information about hardware in Linux/Unix

I want to display information about my hardware, and there are three commands to do that:

dmesg
lshal
dmidecode

but I'm confused between these three commands.

So what is the difference among them?

Upvotes: 0

Views: 1131

Answers (3)

Martin Thorsen Ranang
Martin Thorsen Ranang

Reputation: 2415

I would like to suggest that you use lshw, a very helpful tool to list your hardware. From its man page:

lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

Upvotes: 1

Chhabilal
Chhabilal

Reputation: 1104

The dmesg command is used to write the kernel messages in Linux and other Unix-like operating systems to standard output (which by default is the display screen).

lshal is a utility for displaying items in the HAL device database.

dmidecode is a tool for dumping a computer's DMI (some say SMBIOS ) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

I would suggest to go for "dmesg" and use the options as per you need to obtain information about the hardware on a system. dmesg [options]

Upvotes: 0

Arnab Nandy
Arnab Nandy

Reputation: 6712

The dmesg command is used to write the kernel messages in Linux and other Unix-like operating systems to standard output.

From man pages:

lshal - list HAL devices

lshal is a utility for displaying items in the HAL device database. For more information about both the big picture and specific HAL properties, refer to the HAL spec which can be found in /usr/share/doc/hal-0.5.14/spec/hal-spec.html depending on the distribution.

dmidecode - DMI Table Decoder

dmidecode is a tool for dumping a computer's DMI (some say SMBIOS ) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

Upvotes: 0

Related Questions