How to check hardware details of Linux machine ?

In this post, we will check how to view hardware details of a Linux machine.

This is a very common thing and most of you might be aware, however sometimes we need to look for such small things as well … 🙂

To see all hardware details we can use the dmidecode command.

1. Viewing All hardware details.

[root@nglinux ~]# dmidecode | more
# dmidecode 2.12
SMBIOS 2.7 present.
239 structures occupying 9763 bytes.
Table at 0x000E0010.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
	Vendor: Phoenix Technologies LTD
	Version: 6.00
	Release Date: 07/02/2015
	Address: 0xEA5E0
	Runtime Size: 88608 bytes
	ROM Size: 64 kB
	Characteristics:
		ISA is supported
		PCI is supported
		PC Card (PCMCIA) is supported
		PNP is supported
		APM is supported
### Output Truncated ###

2. Viewing selected information.
If we need to see only selective information from dmidecode, we can specify what information we want to see in front of “-t” type.

To see below information :
1. System Information
2. Base Board Information
3. Chassis Information
4. Processor Information

We can specify the types like below:

# dmidecode -t 1,2,3,4

The command can be seen as:

[root@nglinux ~]# dmidecode -t 1,2,3,4
# dmidecode 2.12
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: VMware, Inc.
	Product Name: VMware Virtual Platform
	Version: None
	Serial Number: VMware-56 4d 7c b1 1f a1 43 bb-9b 22 91 64 41 ea 76 21
	UUID: B17C4D56-A11F-BB43-9B22-916441EA7621
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Not Specified

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: Intel Corporation
	Product Name: 440BX Desktop Reference Platform
	Version: None
	Serial Number: None
	Asset Tag: Not Specified
	Features: None
	Location In Chassis: Not Specified
	Chassis Handle: 0x0000
	Type: Unknown
	Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
	Manufacturer: No Enclosure
	Type: Other
	Lock: Not Present
	Version: N/A
	Serial Number: None
	Asset Tag: No Asset Tag
	Boot-up State: Safe
	Power Supply State: Safe
	Thermal State: Safe
	Security Status: None
	OEM Information: 0x00001234
	Height: Unspecified
	Number Of Power Cords: Unspecified
	Contained Elements: 0

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
	Socket Designation: CPU #000
	Type: Central Processor
	Family: Unknown
	Manufacturer: AuthenticAMD
	ID: 01 0F 73 00 FF FB 8B 07
	Version: AMD A8-6410 APU with AMD Radeon R5 Graphics    
	Voltage: 3.3 V
	External Clock: Unknown
	Max Speed: 30000 MHz
	Current Speed: 2000 MHz
	Status: Populated, Enabled
	Upgrade: ZIF Socket
	L1 Cache Handle: 0x0015
	L2 Cache Handle: 0x0016
	L3 Cache Handle: Not Provided
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
	Core Count: 1
	Core Enabled: 1
	Characteristics:
		64-bit capable
		Execute Protection

[root@nglinux ~]# 

dmidecode shows all details, however suppose you want to look for specific details of CPU, memory, etc. For this, we can use few other utilities available pre-installed with our system.

3. Using lscpu to view CPU details.

[root@nglinux ~]# lscpu 
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Vendor ID:             AuthenticAMD
CPU family:            22
Model:                 48
Model name:            AMD A8-6410 APU with AMD Radeon R5 Graphics
Stepping:              1
CPU MHz:               1996.349
BogoMIPS:              3992.69
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              2048K
[root@nglinux ~]# 

4. To view all USB controllers attached.

[root@nglinux ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
[root@nglinux ~]# 

5. To view all block devices attached.

[root@nglinux ~]# lsblk -a
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0    7:0    0        0 loop 
loop1    7:1    0        0 loop 
loop2    7:2    0        0 loop 
loop3    7:3    0        0 loop 
loop4    7:4    0        0 loop 
loop5    7:5    0        0 loop 
loop6    7:6    0        0 loop 
loop7    7:7    0        0 loop 
sr0     11:0    1 1024M  0 rom  
sda      8:0    0   20G  0 disk 
└─sda1   8:1    0   20G  0 part /
[root@nglinux ~]# 

6. To get all PCI devices connected.

[root@nglinux ~]# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev 02)
00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)

7. To get all disks information.

[root@nglinux ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x44c6c03f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2610    20964793+  83  Linux
[root@nglinux ~]# 

There are many other ways, however the above utilities usually found on every Linux system.

I hope you liked the article, do post your comments/suggestions below.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments