How do I get detailed hardware information about my Linux server using command line options? What is the Linux command to find out hardware information?
You can use any one of the following tool to extract detailed information on the hardware configuration of the machine:
- dmidecode command – See a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.
- lshw command – list hardware command.
- ls* commands.
- /proc/ file system
Method #1 dmidecode tool
Use yum or apt-get command to install dmidecode tool. Once installed, type the following command to list hardware information:
# dmidecode
Sample outputs:
SMBIOS 2.6 present. 18 structures occupying 992 bytes. Table at 0x0009B400. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: 080016 Release Date: 04/01/2010 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 1024 kB Characteristics: ISA is supported PCI is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed ESCD support is available Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported LS-120 boot is supported ATAPI Zip drive boot is supported BIOS boot specification is supported Targeted content distribution is supported BIOS Revision: 8.16 Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: ICP / iEi Product Name: TS-859 PRO Version: V1.0 Serial Number: To Be Filled By O.E.M.
See our article “Get Information About Your BIOS / Server Hardware From a Shell Without Opening Chassis” for more information.
Method #2: lshw too
This tool an report exact memory configuration, firmware version, main board configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines. It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB.
NOTE: Install lshw either using ‘apt-get install lshw‘ (Debian and Friends) or ‘yum instal lshw‘ (Red Hat and Friends). YMMV.
List hardware
Type the lshw at a shell prompt:
# lshw | more
OR
# lshw
Sample outputs:
nas01 description: Computer product: TS-859 PRO (To Be Filled By O.E.M.) vendor: ICP / iEi version: V1.0 serial: To Be Filled By O.E.M. width: 64 bits capabilities: smbios-2.6 dmi-2.6 vsyscall32 configuration: boot=normal family=To Be Filled By O.E.M. sku=To Be Filled By O.E.M. uuid=00020003-0004-0005-0006-000700080009 *-core description: Motherboard product: TS-859 PRO(Q904) vendor: ICP / iEi physical id: 0 version: V1.0 serial: To be filled by O.E.M. slot: To Be Filled By O.E.M. *-firmware description: BIOS vendor: American Megatrends Inc. physical id: 0 version: 080016 date: 04/01/2010 size: 64KiB capacity: 960KiB
To lists hardware in a compact format, type:
# lshw -short
Sample outputs:
H/W path Device Class Description ====================================================== system TS-859 PRO (To Be Filled By O.E.M.) /0 bus TS-859 PRO(Q904) /0/0 memory 64KiB BIOS /0/3 processor Intel(R) Atom(TM) CPU D510 @ 1.66GHz /0/3/4 memory 48KiB L1 cache /0/3/5 memory 1MiB L2 cache /0/8 memory 2GiB System Memory /0/8/0 memory 2GiB DIMM DDR2 Synchronous 667 MHz (1.5 ns) /0/8/1 memory DIMM [empty] /0/100 bridge Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge /0/100/2 display Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller /0/100/2.1 display Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller /0/100/1a bus 82801I (ICH9 Family) USB UHCI Controller #4 /0/100/1a.1 bus 82801I (ICH9 Family) USB UHCI Controller #5 /0/100/1a.2 bus 82801I (ICH9 Family) USB UHCI Controller #6 /0/100/1a.7 bus 82801I (ICH9 Family) USB2 EHCI Controller #2 /0/100/1c bridge 82801I (ICH9 Family) PCI Express Port 1 /0/100/1c.1 bridge 82801I (ICH9 Family) PCI Express Port 2 /0/100/1c.1/0 eth0 network 82574L Gigabit Network Connection /0/100/1c.2 bridge 82801I (ICH9 Family) PCI Express Port 3 /0/100/1c.2/0 eth1 network 82574L Gigabit Network Connection /0/100/1c.5 bridge 82801I (ICH9 Family) PCI Express Port 6 /0/100/1c.5/0 storage JMB363 SATA/IDE Controller /0/100/1c.5/0.1 storage JMB363 SATA/IDE Controller /0/100/1d bus 82801I (ICH9 Family) USB UHCI Controller #1 /0/100/1d.1 bus 82801I (ICH9 Family) USB UHCI Controller #2 /0/100/1d.2 bus 82801I (ICH9 Family) USB UHCI Controller #3 /0/100/1d.7 bus 82801I (ICH9 Family) USB2 EHCI Controller #1 /0/100/1e bridge 82801 PCI Bridge /0/100/1f bridge 82801IR (ICH9R) LPC Interface Controller /0/100/1f.2 scsi1 storage 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] /0/100/1f.2/0 /dev/sda disk 2TB ST32000641AS /0/100/1f.2/0/1 /dev/sda1 volume 40GiB Linux raid autodetect partition /0/100/1f.2/0/2 /dev/sda2 volume 509MiB Linux raid autodetect partition /0/100/1f.2/0/3 /dev/sda3 volume 500GiB Linux raid autodetect partition /0/100/1f.2/0/4 /dev/sda4 volume 200GiB Linux raid autodetect partition /0/100/1f.2/1 /dev/sdb disk 2TB ST32000641AS /0/100/1f.2/1/1 /dev/sdb1 volume 40GiB Linux raid autodetect partition /0/100/1f.2/1/2 /dev/sdb2 volume 509MiB Linux raid autodetect partition /0/100/1f.2/1/3 /dev/sdb3 volume 500GiB Linux raid autodetect partition /0/100/1f.2/1/4 /dev/sdb4 volume 200GiB Linux raid autodetect partition /0/100/1f.2/2 /dev/sdc disk 2TB ST32000641AS /0/100/1f.2/2/1 /dev/sdc1 volume 40GiB Linux raid autodetect partition /0/100/1f.2/2/2 /dev/sdc2 volume 509MiB Linux raid autodetect partition /0/100/1f.2/2/3 /dev/sdc3 volume 500GiB Linux raid autodetect partition /0/100/1f.2/2/4 /dev/sdc4 volume 200GiB Linux raid autodetect partition /0/100/1f.2/3 /dev/sdd disk 2TB ST2000DM001-1CH1 /0/100/1f.2/3/1 /dev/sdd1 volume 40GiB Linux raid autodetect partition /0/100/1f.2/3/2 /dev/sdd2 volume 509MiB Linux raid autodetect partition /0/100/1f.2/3/3 /dev/sdd3 volume 500GiB Linux raid autodetect partition /0/100/1f.2/3/4 /dev/sdd4 volume 200GiB Linux raid autodetect partition /0/100/1f.2/0.0.0 /dev/sde disk 2TB ST32000641AS /0/100/1f.2/0.0.0/1 /dev/sde1 volume 40GiB Linux raid autodetect partition /0/100/1f.2/0.0.0/2 /dev/sde2 volume 509MiB Linux raid autodetect partition /0/100/1f.2/0.0.0/3 /dev/sde3 volume 500GiB Linux raid autodetect partition /0/100/1f.2/0.0.0/4 /dev/sde4 volume 200GiB Linux raid autodetect partition /0/100/1f.3 bus 82801I (ICH9 Family) SMBus Controller /0/1 scsi10 storage /0/1/0.0.0 /dev/sdf disk 515MB SCSI Disk /0/1/0.0.0/1 /dev/sdf1 volume 491MiB EXT3 volume
To lists all disks and storage controllers in the system, type:
# lshw -class disk -class storage
To lists all network interfaces in HTML format, enter:
# lshw -html -class network
ls* Commands
Use the lspci command list all PCI devices on Linux based systems:
# lspci
Use the lscpu command to display information on CPU architecture using Linux based systems:
# lscpu
Use the lsusb command to display information on USB devices using Linux based systems:
# lsusb
Use lsscsi command to list SCSI devices (or hosts) and their attributes on Linux:
# lsscsi
Use lsb_release and uname commands to list your distro and kernel version:
# lsb_release -a
# uname -a
Recommend readings
- ls* Commands Are Even More Useful Than You May Have Thought
- See man pages: uname(1)
(adsbygoogle = window.adsbygoogle || []).push({});