Inspect hardware with dmidecode
In the previous steps, you explored CPU information using cat /proc/cpuinfo
and lscpu
. Now, let's look at a more general tool for inspecting your system's hardware: dmidecode
.
dmidecode
is a tool that reads a computer's DMI (Desktop Management Interface) or SMBIOS (System Management BIOS) table. This table contains information about the system's hardware components, such as the motherboard, BIOS, memory, and more.
Because dmidecode
accesses low-level system information, it requires root privileges. You can use the sudo
command to run dmidecode
with these privileges. Remember, the labex
user has sudo
access without needing a password in this environment.
Type the following command in your terminal to display the full DMI information:
sudo dmidecode
Press Enter.
You will see a large amount of output, detailing various hardware components. The output is structured into different "handles" or sections, each describing a specific part of the system (e.g., BIOS Information, System Information, Baseboard Information, Memory Device).
Here's a snippet of what you might see (output will vary depending on the virtual machine's configuration):
## dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: Google
Version: Google
Release Date: 01/01/2011
Address: 0xE8000
Runtime Size: 96 kB
ROM Size: 128 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25" / 1.2MB floppy services are supported (int 13h)
3.5" / 720kB floppy services are supported (int 13h)
3.5" / 2.88MB 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)
NEC PC-98
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 0.0
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Google
Product Name: Google Compute Engine
Version: pc-i440fx-xenial
Serial Number: ...
UUID: ...
Wake-up Type: Power Switch
SKU Number: ...
Family: Virtual Machine
Handle 0x0002, DMI type 2, 10 bytes
Baseboard Information
Manufacturer: Google
Product Name: Google Compute Engine
Version: pc-i440fx-xenial
Serial Number: ...
Asset Tag: No Asset Tag
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Not Specified
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
... (more output)
You can also specify the type of information you want to see using the -t
option. For example, to see only memory information:
sudo dmidecode -t memory
Press Enter.
This will filter the output to show only details related to the system's memory devices.
dmidecode
is a powerful tool for gathering detailed hardware specifications without opening the computer. It's particularly useful for inventorying hardware or troubleshooting hardware-related issues.
Click Continue to complete this lab.