This is our thrid post on finding different hardware devices information attached to a system. Already covered topics are
Get BIOS, Firmware, Hardware And Drivers Details in Linux/Unix
In this post we will see other commands which will give you complete picture of your system hardware.
lshw is latest one in this list which will show you hardware information. This
Example1 : Get all the hardware attached to a machine
lshw
Clipped Output:
linuxnix.com
description: Notebook
product: HP 430 Notebook PC (A2N30PA#AKL)
vendor: Hewlett-Packard
version: 058A100000004C10002600000
serial: 5CB1332JGF
width: 64 bit's
capabilities: smbios-2.7 dmi-2.7 vsyscall32
configuration: boot=normal chassis=notebook family=103C_5336AN G=N L=SMB B=HP S=430 sku=A2N30PA#AKL uuid=6A4DAC04-4718-B292-3789-9E369A99060F
*-core
description: Motherboard
product: 3672
vendor: Hewlett-Packard
physical id: 0
version: 23.37
serial: PCANEA5JE1C3G7
sa lot: Base Board Chassis Location
*-firmware
description: BIOS
vendor: Hewlett-Packard
physical id: 0
version: F.22
date: 07/27/2011
size: 1MiB
capacity: 2496KiB
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
*-memory
description: System Memory
physical id: f
sa lot: System board or motherboard
size: 8GiB
Example 2: Display all the BUS information in a system.
lshw -businfo
Output:
Bus info Device Class Description
=========================================================
system HP 430 Notebook PC (A2N30PA#AKL)
bus 3672
memory 1MiB BIOS
memory 8GiB System Memory
memory 4GiB SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
memory 4GiB SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
cpu@0 processor Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
memory 32KiB L1 cache
memory 256KiB L2 cache
memory 3MiB L3 cache
memory 32KiB L1 cache
pci@0000:00:00.0 bridge 2nd Generation Core Processor Family DRAM Controller
pci@0000:00:02.0 display 2nd Generation Core Processor Family Integrated Graphics Controller
pci@0000:00:16.0 communication 6 Series/C200 Series Chipset Family MEI Controller #1
pci@0000:00:1a.0 bus 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
pci@0000:00:1b.0 multimedia 6 Series/C200 Series Chipset Family High Definition Audio Controller
pci@0000:00:1c.0 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 1
pci@0000:01:00.0 eth0 network RTL8111/8168 PCI Express Gigabit Ethernet controller
pci@0000:00:1c.2 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 3
pci@0000:02:00.0 wlan0 network AR9285 Wireless Network Adapter (PCI-Express)
pci@0000:00:1c.4 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 5
pci@0000:03:00.0 generic RTS5209 PCI Express Card Reader
pci@0000:00:1d.0 bus 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
pci@0000:00:1f.0 bridge HM65 Express Chipset Family LPC Controller
pci@0000:00:1f.2 storage 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
pci@0000:00:1f.3 bus 6 Series/C200 Series Chipset Family SMBus Controller
scsi0 storage
scsi@0:0.0.0 /dev/sda disk 640GB WDC WD6400BPVT-6
scsi@0:0.0.0,1 /dev/sda1 volume 37GiB EXT4 volume
scsi@0:0.0.0,2 /dev/sda2 volume 558GiB Extended partition
/dev/sda5 volume 37GiB Linux filesystem partition
/dev/sda6 volume 14GiB Linux swap / Solaris partition
/dev/sda7 volume 506GiB Linux filesystem partition
scsi2 storage
scsi@2:0.0.0 /dev/cdrom3 disk DVD A DS8A5LH
power MU06047
virbr0-nic network Ethernet interface
Example3: We can even use lshw command to get RAM/Memory details as well Cache details such as L1, L2 and L3 levels.
lshw -class memory
*-firmware
description: BIOS
vendor: Hewlett-Packard
physical id: 0
version: F.22
date: 07/27/2011
size: 1MiB
capacity: 2496KiB
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
*-memory
description: System Memory
physical id: f
sa lot: System board or motherboard
size: 8GiB
*-bank:0
description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
product: 99U5428-046.A00LF
vendor: Kingston
physical id: 0
serial: 4B29A74B
sa lot: DIMM0
size: 4GiB
width: 64 bit's
clock: 1333MHz (0.8ns)
*-bank:1
description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
product: 99U5428-046.A00LF
vendor: Kingston
physical id: 1
serial: 4729BF4B
sa lot: DIMM1
size: 4GiB
width: 64 bit's
clock: 1333MHz (0.8ns)
*-cache:0
description: L1 cache
physical id: 1c
sa lot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-through instruction
*-cache:1
description: L2 cache
physical id: 1d
sa lot: L2 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-through unified
*-cache:2
description: L3 cache
physical id: 1e
sa lot: L3 Cache
size: 3MiB
capacity: 3MiB
capabilities: synchronous internal write-through unified
*-cache
description: L1 cache
physical id: 1b
sa lot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-through data
Example4: To display hardware information in GUI we can use below commands
hardinfo
or
sysinfo
There are other commands available in linux such as hwinfo, udevadm which will give us information about hardware installed.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix - June 29, 2020 - FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018