BASH Hardware Discovery

From Indie IT Wiki
Jump to: navigation, search

HOWTO:

List Hardware

Full Listing:

sudo lshw

Short Listing:

sudo lshw -short

Save To File:

sudo lshw -html > /path/to/file/lshw.html

CPU Information

sudo lscpu

Block Devices

Such as hard drives, flash drives etc.

sudo lsblk

sudo lsblk -a # Expanded details

USB Information

sudo lsusb

sudo lsusb -v # Expanded details

PCI Information

sudo lspci

sudo lspci -t # Information in tree format

sudo lspci -v # Expanded details

SCSI Information

Also covers SATA devices.

sudo lsscsi

sudo lsscsi -s # Lists capacities where applicable

SATA Devices Information

sudo hdparm /dev/sdX # Where X is the label of the drive on your system

sudo hdparm -h # Lists all switch options

File System Information

sudo fdisk -l

Memory Details

sudo dmidecode -t memory

Maximum Amount Of RAM Supported By The Motherboard

sudo dmidecode -t 16

or

sudo perl memconf

Thanks to 4Smidts.

Motherboard Details

sudo dmidecode | grep -A4 'Base Board'

The above should return something similar too:

Base Board Information
	Manufacturer: ASUSTeK Computer INC.
	Product Name: M5A78L-M/USB3
	Version: Rev X.0x
	Serial Number: 130208251600119

Other options include:

bios-vendor 
bios-version
bios-release-date
system-manufacturer
system-product-name
system-version
system-serial-number
system-uuid
baseboard-manufacturer
baseboard-product-name
baseboard-version
baseboard-serial-number
baseboard-asset-tag
chassis-manufacturer
chassis-type
chassis-version
chassis-serial-number
chassis-asset-tag
processor-family
processor-manufacturer
processor-version processor-frequency