GNU/Linux hardware information with ‘lshw’
by Amit
I just came across this small tool to display the complete hardware information on my GNU/Linux system. It is “lshw”.
Here is a sample run showing just a part of the output :
ubuntu-laptop
description: Computer
product: Aspire 3680
vendor: Acer, inc.
version: Not Applicable
serial: LXAZL0C0337130ED5A2500
width: 32 bits
capabilities: smbios-2.4 dmi-2.4
configuration: administrator_password=enabled boot=oem-specific frontpanel_password=unknown keyboard_password=unknown power-on_password=enabled uuid=60ECC93C-1904-D911-A9FC-001B24102BCC
*-core
description: Motherboard
product: Prespa1
vendor: Acer, Inc.
physical id: 0
version: Not Applicable
serial: LXAZL0C0337130ED5A2500
*-firmware
description: BIOS
vendor: Acer
physical id: 0
version: v1.3503 (03/03/07)
size: 101KB
capacity: 960KB
capabilities: isa pci pcmcia pnp upgrade shadowing escd cdboot acpi usb biosbootspecification
*-cpu
description: CPU
product: Intel(R) Celeron(R) M CPU 440 @ 1.86GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: 6.14.12
serial: 0000-06EC-0000-0000-0000-0000
slot: U2E1
size: 1860MHz
capacity: 1860MHz
width: 32 bits
clock: 133MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx constant_tsc up pni monitor tm2 xtpr
And if you dont like the *text* output then there is also an option (a switch) which actually displays the complete hardware information as a pretty HTML file. And in-case you want your program to read the output easily then there is also an option to display the output as a XML tree. Sounds Interesting? Do a man lshw