How to Check Hardware Specifications on Linux
In this Linux tutorial, we will learn how to check the hardware specifications installed on the computer. The hardware that is checked is the processor, memory, hard disk, display adapter, network interface, and laptop battery.
Hardware List
We can display all hardware lists with one command lshw.
1 | sudo lshw |
The above command immediately displays a list of hardware devices in the terminal. Since the list is very long, we can limit the list per page with the command less and continue to the next page by pressing the space key.
1 | sudo lshw | less |
The hardware list can also be saved as a text or html file.
1 2 | sudo lshw > hardware.txt sudo lshw -html > hardware.html |
Hardware: CPU
Display processor information.
1 | sudo lshw -class processor |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | *-cpu description: CPU product: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz vendor: Intel Corp. physical id: 45 bus info: cpu@0 version: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz serial: To Be Filled By O.E.M. slot: U3E1 size: 2560MHz capacity: 3100MHz width: 64 bits clock: 100MHz capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d cpufreq configuration: cores=2 threads=4 |
- product/version: the processor used is an Intel Core i7-6500U
- width: 64 bit processor architecture
- configuration: 2 core 4 thread
Another way to display processor hardware information is the lscpu command.
1 | lscpu |
Example of the results of the command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 39 bits physical, 48 bits virtual CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 78 Model name: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz Stepping: 3 CPU MHz: 572.001 CPU max MHz: 3100,0000 CPU min MHz: 400,0000 BogoMIPS: 5199.98 Virtualization: VT-x L1d cache: 64 KiB L1i cache: 64 KiB L2 cache: 512 KiB L3 cache: 4 MiB NUMA node0 CPU(s): 0-3 Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable Vulnerability Meltdown: Mitigation; PTI Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling Vulnerability Srbds: Mitigation; Microcode Vulnerability Tsx async abort: Not affected Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm p be syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aper fmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mp x rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_w indow hwp_epp md_clear flush_l1d |
Hardware: RAM
Show memory information.
1 | sudo lshw -class memory |
Example of the snippet of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ... *-memory description: System Memory physical id: 46 slot: System board or motherboard size: 8GiB *-bank:0 description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns) product: HMT451S6BFR8A-PB vendor: SK Hynix physical id: 0 serial: 12151215 slot: DIMM A size: 4GiB width: 64 bits clock: 1600MHz (0.6ns) *-bank:1 description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns) product: CMSO4GX3M1C1600C11 vendor: AMI physical id: 1 serial: 12121212 slot: DIMM B size: 4GiB width: 64 bits clock: 1600MHz (0.6ns) ... |
All information that is in the memory category including firmware and cache is also displayed. RAM-related is the System Memory section.
- memory->size: the total installed memory capacity is 8GB
- bank: There are 2 memory slots available on the laptop. DDR3 type RAM, different brands, each with a capacity of 4GB
Hardware: Disk
Show disk information.
1 | sudo lshw -class disk |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 | *-disk description: ATA Disk product: ST1000LM024 HN-M physical id: 0 bus info: scsi@0:0.0.0 logical name: /dev/sda version: 0003 serial: S314JA0G990723 size: 931GiB (1TB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=1994473c ... |
From the information above, it is known that the attached disk is ATA type with a storage capacity of 1TB.
Hardware: Display Adapter
Show display adapter information.
1 | sudo lshw -class display |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | *-display description: VGA compatible controller product: Skylake GT2 [HD Graphics 520] vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 07 width: 64 bits clock: 33MHz capabilities: pciexpress msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:129 memory:d1000000-d1ffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff *-display description: Display controller product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] vendor: Advanced Micro Devices, Inc. [AMD/ATI] physical id: 0 bus info: pci@0000:01:00.0 version: 81 width: 64 bits clock: 33MHz capabilities: pm pciexpress msi bus_master cap_list rom configuration: driver=radeon latency=0 resources: irq:130 memory:c0000000-cfffffff memory:d0000000-d003ffff ioport:e000(size=256) memory:d0040000-d005ffff |
From the information above, it is known that there are 2 display adapters, VGA Intel HD Graphics and AMD Radeon.
Hardware: Network
Show network interface information.
1 | sudo lshw -class network |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | *-network description: Wireless interface product: RTL8723BE PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 logical name: wlp2s0 version: 00 serial: 4c:bb:58:ca:c1:a7 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rtl8723be driverversion=5.4.0-58-generic firmware=N/A ip=192.168.1.16 latency=0 link=yes multicast=yes wireless=IEEE 802.11 resources: irq:16 ioport:d000(size=256) memory:d2100000-d2103fff *-network description: Ethernet interface product: RTL810xE PCI Express Fast Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:03:00.0 logical name: enp3s0 version: 07 serial: f8:ca:b8:04:a1:c6 capacity: 100Mbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII resources: irq:17 ioport:c000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff |
From the information above, it is known that there are 2 network interfaces, namely the Wireless interface and the Ethernet interface, both of which are products of Realtek.
The lscpi and lsusb commands
Another command that can be used to display all PCI hardware is lspci, including display, network, audio, etc.
1 | lspci |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08) 00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21) 00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21) 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) 00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1) 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1) 00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1) 00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] (rev 81) 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 07) |
The command to display all USB hardware is lsusb, including bluetooth, card reader, and webcam.
1 | lsusb |
Example of the command above.
1 2 3 4 5 6 | Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0bda:b739 Realtek Semiconductor Corp. Bluetooth Radio Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 003: ID 1bcf:2b90 Sunplus Innovation Technology Inc. Integrated_Webcam_HD Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
Hardware: Battery
Show battery information.
1 | upower -i /org/freedesktop/UPower/devices/battery_BAT0 |
Example of the command above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | native-path: BAT0 vendor: SMP model: DELL VN3N047 serial: 54078 power supply: yes updated: Kam 31 Des 2020 10:12:09 (39 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: charging warning-level: none energy: 24,12 Wh energy-empty: 0 Wh energy-full: 24,12 Wh energy-full-design: 37,44 Wh energy-rate: 0,0144 W voltage: 16,167 V percentage: 100% capacity: 64,4231% technology: lithium-ion icon-name: 'battery-full-charging-symbolic' |
- model: battery model or series
- state: the status is charging or discharging
- percentage: how much power is still stored
- capacity: how much power storage capacity is, is the battery still good enough to be recharged
If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!
Donate via PayPal: https://paypal.me/musaamin