linux how to get hardware details
There are multiple commands that you can run on *nix systems to get details of your hardware. Below are some popular commands used (some are not installed by default).
lshw
list hardware. It provides detailed information on the hardware configuration of the machine. It tells you memory configuration, firmware version, motherboard configuration, CPU/processor speed and type etc. You can output information in json, html format too.
$ lshw -short H/W path Device Class Description =========================================================== system HP Spectre x360 Convertible (N5R93UA#ABA) /0 bus 802D /0/0 memory 64KiB BIOS /0/10 memory 32KiB L1 cache /0/11 memory 32KiB L1 cache /0/12 memory 256KiB L2 cache /0/13 memory 4MiB L3 cache /0/14 processor Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz /0/16 memory 8GiB System Memory /0/16/0 memory 4GiB Row of chips LPDDR3 Synchronous 1600 MHz (0.6 ns) /0/16/1 memory 4GiB Row of chips LPDDR3 Synchronous 1600 MHz (0.6 ns) /0/112 generic /0/100 bridge Broadwell-U Host Bridge -OPI /0/100/2 display HD Graphics 5500 /0/100/3 multimedia Broadwell-U Audio Controller /0/100/14 bus Wildcat Point-LP USB xHCI Controller ... ...
lscpu
will give you details about the CPU. Find details about CPU make, speed, type, and configuration. See the number of cores and threads. You can use this information to find if hyperthreading is on or off!
$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian 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: 61 Model name: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz Stepping: 4 CPU MHz: 2895.703 CPU max MHz: 3000.0000 CPU min MHz: 500.0000 BogoMIPS: 4788.82 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 4096K NUMA node0 CPU(s): 0-3 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 pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu 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 epb intel_pt ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts spec_ctrl intel_stibp
lspci
list all PCI (Peripheral Component Interconnect) devices. PCI is a kind of a bus. Some common devices that use PCI are modems, network card, Graphics card, Sound Card,
$ lspci 00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09) 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #2 (rev e3) 00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03) 01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01) 02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 50)
to get a lot more detailed information you can use “lspci -v” or even “lspci -vv”.
see some devices use PCI Express slots.
PCI Express or PCIe provides more bandwidth and are much faster than PCI (which is an older interface).
lsusb
list usb devices.
# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bus 001 Device 004: ID 048d:8350 Integrated Technology Express, Inc. Bus 001 Device 003: ID 04f3:2070 Elan Microelectronics Corp. Bus 001 Device 002: ID 1bcf:2c7d Sunplus Innovation Technology Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
you can use -v option to get detailed output.
hwinfo
very useful to get a detailed output of all your hardware. It uses libhd library. It was discontinued in older version of ubuntu but again re-continued. You can get detailed output of disk, mouse, printers, keyboard, graphics cards, controllers, network interfaces etc.
$ hwinfo --short cpu: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2720 MHz Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2920 MHz Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2900 MHz Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2972 MHz keyboard: /dev/input/event3 AT Translated Set 2 keyboard mouse: /dev/input/mice Elan Microelectronics Touchscreen /dev/input/mice SynPS/2 Synaptics TouchPad monitor: LCD Monitor graphics card: Intel HD Graphics 5500 sound: Intel Broadwell-U Audio Controller Intel Wildcat Point-LP High Definition Audio Controller storage: Intel Wildcat Point-LP SATA Controller [AHCI Mode] network: wlo1 Intel Dual Band Wireless-AC 7265 network interface: virbr0 Ethernet network interface virbr0-nic Ethernet network interface wlo1 Ethernet network interface lo Loopback network interface disk: /dev/sda AXNS381E-256GM-B partition: /dev/sda1 Partition /dev/sda2 Partition /dev/sda3 Partition usb controller: Intel Wildcat Point-LP USB xHCI Controller bios: BIOS bridge: Intel Broadwell-U Host Bridge -OPI Intel Wildcat Point-LP PCI Express Root Port #2 Intel Wildcat Point-LP PCI Express Root Port #3 Intel Wildcat Point-LP LPC Controller hub: Linux Foundation 2.0 root hub Linux Foundation 3.0 root hub memory: Main Memory bluetooth: Intel Bluetooth Device unknown: FPU DMA controller PIC Timer Keyboard controller Intel Wildcat Point-LP MEI Controller #1 Intel Wildcat Point-LP SMBus Controller Realtek RTS5227 PCI Express Card Reader /dev/input/event9 Sunplus Innovation HP Truevision Full HD Integrated Technology Express ITE Device(8350)
hdparm
is very useful to get hard disk information. If you want to check if a disk is SSD you can use hdparm!
hdparm -I /dev/sda /dev/sda: ATA device, with non-removable media Model Number: AXNS381E-256GM-B Serial Number: 2F2520037935 Firmware Revision: 263j-HP Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0 Standards: Supported: 9 8 7 6 5 Likely used: 9 Configuration: Logical max current cylinders 16383 16383 heads 16 16 sectors/track 63 63 -- CHS current addressable sectors: 16514064 LBA user addressable sectors: 268435455 LBA48 user addressable sectors: 500118192 Logical Sector size: 512 bytes Physical Sector size: 512 bytes Logical Sector-0 offset: 0 bytes device size with M = 1024*1024: 244198 MBytes device size with M = 1000*1000: 256060 MBytes (256 GB) cache/buffer size = unknown Form Factor: less than 1.8 inch Nominal Media Rotation Rate: Solid State Device Capabilities: LBA, IORDY(can be disabled) Queue depth: 32 Standby timer values: spec'd by Standard, no device specific minimum R/W multiple sector transfer: Max = 16 Current = 16 Advanced power management level: 254 DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=120ns IORDY flow control=120ns Commands/features: Enabled Supported: * SMART feature set Security Mode feature set * Power Management feature set * Write cache * Look-ahead * Host Protected Area feature set * WRITE_BUFFER command * READ_BUFFER command * NOP cmd * DOWNLOAD_MICROCODE * Advanced Power Management feature set SET_MAX security extension * 48-bit Address feature set * Device Configuration Overlay feature set * Mandatory FLUSH_CACHE * FLUSH_CACHE_EXT * SMART error logging * SMART self-test * General Purpose Logging feature set * WRITE_{DMA|MULTIPLE}_FUA_EXT * 64-bit World wide name IDLE_IMMEDIATE with UNLOAD * WRITE_UNCORRECTABLE_EXT command * {READ,WRITE}_DMA_EXT_GPL commands * Segmented DOWNLOAD_MICROCODE * Gen1 signaling speed (1.5Gb/s) * Gen2 signaling speed (3.0Gb/s) * Gen3 signaling speed (6.0Gb/s) * Native Command Queueing (NCQ) * Phy event counters * Idle-Unload when NCQ is active * unknown 76[15] * DMA Setup Auto-Activate optimization Device-initiated interface power management * Software settings preservation unknown 78[8] * SMART Command Transport (SCT) feature set * SCT Error Recovery Control (AC3) * SCT Features Control (AC4) * SCT Data Tables (AC5) * DOWNLOAD MICROCODE DMA command * WRITE BUFFER DMA command * READ BUFFER DMA command * Data Set Management TRIM supported (limit 2 blocks) Security: Master password revision code = 65534 supported not enabled not locked not frozen not expired: security count supported: enhanced erase 2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. Logical Unit WWN Device Identifier: 5000000000000000 NAA : 5 IEEE OUI : 000000 Unique ID : 000000000 Checksum: correct
dmidecode
this command is used to dump BIOS information in a readable format. It loads this information from DMI table from sysfs or memory (if unavailable in sysfs)
# dmidecode -t processor # dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.8 present. Handle 0x0014, DMI type 4, 42 bytes Processor Information Socket Designation: SOCKET 0 Type: Central Processor Family: Core i7 Manufacturer: Intel(R) Corporation ID: D4 06 03 00 FF FB EB BF Signature: Type 0, Family 6, Model 61, Stepping 4 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) i7-5500U CPU @ 2.40GHz Voltage: 0.9 V External Clock: 100 MHz Max Speed: 2400 MHz Current Speed: 2400 MHz Status: Populated, Enabled Upgrade: Socket BGA1168 L1 Cache Handle: 0x0011 L2 Cache Handle: 0x0012 L3 Cache Handle: 0x0013 Serial Number: NULL Asset Tag: FFFF Part Number: SMBIOS_TYPE_4_PART_NUMBER Core Count: 2 Core Enabled: 2 Thread Count: 4 Characteristics: 64-bit capable Multi-Core Hardware Thread Execute Protection Enhanced Virtualization Power/Performance Control
You must be logged in to post a comment.
+ There are no comments
Add yours