Linux Administrator

Get Hardware Information With Dmidecode Command

Every Linux Administrator should know about the basic Linux hardware configuration. There are lots of tool available in the market to get the hardware information in Linux. Dmidecode is a tool for dumping a computer’s DMI (Desktop Management Interface) 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 like serial numbers and BIOS revision.

In this article I will describe how to get hardware information with Dmidecode command on Linux machine.

Install Dmidecode

Follow the below command to install the dmidecode command:

$ sudo apt-get install dmidecode

You will get some output like below:

Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  dmidecode
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.9 kB of archives.
After this operation, 196 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/main dmidecode amd64 2.12-2 [45.9 kB]
Fetched 45.9 kB in 0s (52.2 kB/s)    
Selecting previously unselected package dmidecode.
(Reading database ... 218604 files and directories currently installed.)
Preparing to unpack .../dmidecode_2.12-2_amd64.deb ...
Unpacking dmidecode (2.12-2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up dmidecode (2.12-2) ...
.................................

Dmidecode Tool Usage

Follow the below command to use the dmidecode tool:

$ sudo dmidecode

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.
45 structures occupying 2096 bytes.
Table at 0xCBD68018.

Handle 0xDA00, DMI type 218, 251 bytes
OEM-specific Type
	Header and Data:
		DA FB 00 DA B2 00 0D 5F 0F 37 40 7D 00 00 00 00
		00 7E 00 01 00 00 00 75 01 01 80 01 00 76 01 02
		80 01 00 2D 01 03 80 01 00 2E 01 04 80 00 00 4F
		02 05 80 01 00 50 02 06 80 00 00 E2 01 02 00 00
		00 E1 01 02 00 01 00 E3 01 02 00 02 00 58 02 20
		80 00 00 57 02 20 80 01 00 9C 00 03 00 01 00 9B
		00 03 00 00 00 8A 01 04 00 01 00 89 01 04 00 00
		00 7F 01 05 00 00 00 80 01 05 00 01 00 53 01 06
		00 00 00 52 01 06 00 01 00 7B 01 07 00 00 00 7C
		01 07 00 01 00 94 01 08 00 00 00 93 01 08 00 01
		00 7D 00 09 00 00 00 2D 00 0A 00 01 00 2E 00 0A
		00 00 00 6E 00 0B 00 00 00 95 00 0C 00 01 00 96
		00 0C 00 00 00 2F 02 0D 00 01 00 30 02 0D 00 00
		00 4B 01 0E 00 01 00 4A 01 0E 00 00 00 37 01 0F
		00 00 00 38 01 0F 00 01 00 39 01 0F 00 02 00 2E
		02 07 80 01 00 FF FF 00 00 00 00

........................

Get More Information About Dmidecode

Use the following command to get the more information about dmidecode:

$ dmidecode --help

You will get some output like below:

Usage: dmidecode [OPTIONS]
Options are:
 -d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem)
 -h, --help             Display this help text and exit
 -q, --quiet            Less verbose output
 -s, --string KEYWORD   Only display the value of the given DMI string
 -t, --type TYPE        Only display the entries of given type
 -u, --dump             Do not decode the entries
     --dump-bin FILE    Dump the DMI data to a binary file
     --from-dump FILE   Read the DMI data from a binary file
 -V, --version          Display the version and exit

Use the following command line syntax to get more information about individual device configuration.

$ sudo dmidecode -t Device_Name

BIOS Information

Use the following command to get the bios information.

$ sudo dmidecode -t bios

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
	Vendor: Dell Inc.
	Version: A04
	Release Date: 08/05/2014
	Address: 0xF0000
	Runtime Size: 64 kB
	ROM Size: 2048 kB
	Characteristics:
		MCA is supported
		PCI 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
		ATAPI Zip drive boot is supported
		BIOS boot specification is supported
		Targeted content distribution is supported
		UEFI is supported
	BIOS Revision: 0.4
	Firmware Revision: 0.4

.............

Memory Information

Use the below command to get the memory information:

$ sudo dmidecode -t memory 

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.

Handle 0x0017, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 8192 MB
	Form Factor: SODIMM
	Set: None
	Locator: DIMM_A
	Bank Locator: Bank 0
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1600 MHz
	Manufacturer: Transcend
	Serial Number: 000A7430
	Asset Tag: 54150300     
	Part Number: TS1GSK64W6H       
	Rank: 2
	Configured Clock Speed: 1600 MHz
	Minimum voltage:  1.350 V
	Maximum voltage:  1.500 V
	Configured voltage:  1.350 V

......................................

Processor Information

Use the following command to get the processor information:

$ sudo dmidecode -t processor 

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.

Handle 0x0024, DMI type 4, 42 bytes
Processor Information
	Socket Designation: SOCKET 0
	Type: Central Processor
	Family: Core i5
	Manufacturer: Intel
	ID: 51 06 04 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 69, Stepping 1
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
.............................

Cache Information

Use the following command to get the cache information:

$ sudo dmidecode -t cache

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L3
	Configuration: Enabled, Not Socketed, Level 3
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 3072 kB
	Maximum Size: 3072 kB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Single-bit ECC
	System Type: Unified
	Associativity: 12-way Set-associative
...............................................

Port Connector Information

Use the below command to get the port connector information:

$ sudo dmidecode port connector

You will get some output like below:

# dmidecode 2.12
# SMBIOS entry point at 0xcbf6b498
SMBIOS 2.8 present.
45 structures occupying 2096 bytes.
Table at 0xCBD68018.

Handle 0xDA00, DMI type 218, 251 bytes
OEM-specific Type
	Header and Data:
		DA FB 00 DA B2 00 0D 5F 0F 37 40 7D 00 00 00 00
		00 7E 00 01 00 00 00 75 01 01 80 01 00 76 01 02
		80 01 00 2D 01 03 80 01 00 2E 01 04 80 00 00 4F
		02 05 80 01 00 50 02 06 80 00 00 E2 01 02 00 00
		00 E1 01 02 00 01 00 E3 01 02 00 02 00 58 02 20
		80 00 00 57 02 20 80 01 00 9C 00 03 00 01 00 9B
		00 03 00 00 00 8A 01 04 00 01 00 89 01 04 00 00
		00 7F 01 05 00 00 00 80 01 05 00 01 00 53 01 06
		00 00 00 52 01 06 00 01 00 7B 01 07 00 00 00 7C
		01 07 00 01 00 94 01 08 00 00 00 93 01 08 00 01
		00 7D 00 09 00 00 00 2D 00 0A 00 01 00 2E 00 0A
		00 00 00 6E 00 0B 00 00 00 95 00 0C 00 01 00 96
		00 0C 00 00 00 2F 02 0D 00 01 00 30 02 0D 00 00
		00 4B 01 0E 00 01 00 4A 01 0E 00 00 00 37 01 0F
		00 00 00 38 01 0F 00 01 00 39 01 0F 00 02 00 2E
		02 07 80 01 00 FF FF 00 00 00 00
................................................

These are the basic Linux machine hardware information.

Thanks:)

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment