Get information about your computer hardware with Linux.

Posted: May 17, 2015. At: 8:40 PM. This was 3 years ago. Post ID: 8184
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

Get information about installed hardware with these commands

This command will print the make and model of your motherboard.

[email protected]:~$ sudo dmidecode -t baseboard
[sudo] password for jason: 
# dmidecode 2.12
SMBIOS 2.4 present.
Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
	Manufacturer: Gigabyte Technology Co., Ltd.
	Product Name: H55-USB3
	Version: x.x
	Serial Number:

To get information about your network hardware use lshw. The sudo lshw -class network command will give you the required information.

ubuntu ~ $ sudo lshw -class network
       description: Ethernet interface
       physical id: 1
       logical name: eth0
       serial: 06:d6:3a:a8:82:13
       capabilities: ethernet physical
       configuration: broadcast=yes driver=vif ip= link=yes multicast=yes

This one-liner will return just the interface MAC address.

ubuntu ~ $ sudo lshw -class network | grep serial
       serial: 06:d6:3a:a8:82:13

The lspci command will return a simple listing of computer hardware. This is a quick way to see what you have in a system.

ubuntu ~ $ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)

And finally, to get information about your installed CPU, use the lscpu command.

ubuntu ~ $ lscpu
Architecture:          x86_64
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
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Stepping:              4
CPU MHz:               2500.110
BogoMIPS:              5000.22
Hypervisor vendor:     Xen
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              25600K
NUMA node0 CPU(s):     0

No comments have been made. Use this form to start the conversation :)

Leave a Reply