Users can easily check the configuration of the system hardware on a Windows machine by opening the Computer Information app.
This can be easily verified on the Linux machine via the GUI. But on a headless Linux system it is not so easy to verify this information.
Linux has plenty of commands to check for system configuration and hardware information.
But not all tools will show you the same information, each tool is designed for a specific purpose and they do their job well.
Some of these commands provide all the information. We will show you all the commands and their details.
On Linux, most system hardware information is stored under the “/proc” file system.
What’s proc filesystem (procfs)
The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information.
It’s sometimes referred to as a process information pseudo-file system. It doesn’t contain ‘real’ files but run time system information (e.g. system memory, devices mounted, hardware configuration, etc).
1) How to Check CPU and Processing Units Using the lscpu Command
The lscpu command display information about the CPU and processing units. It gathers CPU architecture information from sysfs, and other information from /proc/cpuinfo file.
The below output shows the following information, for example, the number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information about the CPU caches and cache sharing, family, model, bogoMIPS, byte order, and stepping.
$ lscpu 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): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 94 Model name: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Stepping: 3 CPU MHz: 800.059 CPU max MHz: 3500.0000 CPU min MHz: 800.0000 BogoMIPS: 5186.00 Virtualization: VT-x L1d cache: 128 KiB L1i cache: 128 KiB L2 cache: 1 MiB L3 cache: 6 MiB NUMA node0 CPU(s): 0-7 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 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 art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2a pic 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 v pid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_not ify hwp_act_window hwp_epp md_clear flush_l1d
The above command shows a consolited output of CPU processor and run the following command to see each CPU processor information.
$ cat /proc/cpuinfo
You can easily count the number of CPUs using the following command.
$ grep pro /proc/cpuinfo -c 8
2) How to Check Memory Information Using the free Command
The free command is widely used by Linux administrator to check Linux system memory, it’s very simple and displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel.
$ free total used free shared buff/cache available Mem: 15867 5362 3962 3253 6542 6921 Swap: 17454 19 17434 Total: 33322 5381 21397
2a) How to Check Memory Information Using the /proc/meminfo file
The /proc/meminfo is a virtual text file that contains a large amount of valuable information about the systems RAM usage.
It’s report the amount of free and used memory (both physical and swap) on the system.
$ cat /proc/meminfo MemTotal: 16248580 kB MemFree: 4752704 kB MemAvailable: 7765292 kB Buffers: 358928 kB Cached: 5531420 kB SwapCached: 5092 kB Active: 6536872 kB Inactive: 4293640 kB Active(anon): 4799788 kB Inactive(anon): 2969076 kB Active(file): 1737084 kB Inactive(file): 1324564 kB Unevictable: 72 kB Mlocked: 72 kB SwapTotal: 17873388 kB SwapFree: 17853276 kB Dirty: 416 kB Writeback: 0 kB AnonPages: 4935676 kB Mapped: 1705744 kB Shmem: 2828700 kB Slab: 409720 kB SReclaimable: 290028 kB SUnreclaim: 119692 kB KernelStack: 20800 kB PageTables: 51820 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 25997676 kB Committed_AS: 16015836 kB VmallocTotal: 34359738367 kB VmallocUsed: 0 kB VmallocChunk: 0 kB Percpu: 3136 kB HardwareCorrupted: 0 kB AnonHugePages: 0 kB ShmemHugePages: 0 kB ShmemPmdMapped: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB Hugetlb: 0 kB DirectMap4k: 364816 kB DirectMap2M: 9945088 kB DirectMap1G: 7340032 kB
Run the below command to see the memory output with GB instead of KB.
$ awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | column -t
Run the below command to see only total memory output with GB instead of KB.
$ awk '$3=="kB"{$2=$2/1024**2;$3="GB";} 1' /proc/meminfo | grep "MemTotal:" | column -t MemTotal: 15.4959 GB
Run the below command to see the memory output with MB instead of KB.
$ wk '$3=="kB"{$2=$2/1024;$3="MB";} 1' /proc/meminfo | column -t
Run the below command to see only total memory output with MB instead of KB.
awk '$3=="kB"{$2=$2/1024;$3="MB";} 1' /proc/meminfo | grep "MemTotal:" | column -t MemTotal: 15867.8 MB
2b) How to Check Memory Information Using the vmstat Command
The vmstate command report virtual memory statistics. It reports information about processes, memory, paging, block IO, traps, disks and cpu activity.
$ vmstat -s 16248580 K total memory 5450792 K used memory 6674780 K active memory 4715692 K inactive memory 4186292 K free memory 361764 K buffer memory 6249732 K swap cache 17873388 K total swap 20112 K used swap 17853276 K free swap 3263070 non-nice user cpu ticks 5866 nice user cpu ticks 1227150 system cpu ticks 4786921 idle cpu ticks 7334 IO-wait cpu ticks 110603 IRQ cpu ticks 117162 softirq cpu ticks 0 stolen cpu ticks 4267698 pages paged in 14447480 pages paged out 140 pages swapped in 3912 pages swapped out 109198652 interrupts 405310013 CPU context switches 1569730175 boot time 36197 forks
3) How to Check PCI Bus Devices Information Using the lspci Command
The lspci stands for list PCI devices. lspci command is used to display information about PCI buses in the system and hardware devices that are connected to PCI and PCI bus.
It will display information about model number/chip details for devices like PCI bridge, VGA controller, Ethernet controller, USB controller, Audio device, IDE interface, etc,.,
$ lspci 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07) 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) 00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31) 00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31) 00:17.0 SATA controller: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] (rev 31) 00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2 (rev f1) 00:1c.2 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 (rev f1) 00:1c.3 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #4 (rev f1) 00:1d.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 (rev f1) 00:1f.0 ISA bridge: Intel Corporation HM170 Chipset LPC/eSPI Controller (rev 31) 00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31) 00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) 00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31) 01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2) 07:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) 08:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a) 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 0a:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 (rev 01)
Details of the above output: Each line comes with three parts, it’s described below in detail.
PCI bus slot number:
09:00.0PCI slot name:
Ethernet controllerDevice Manufacturer Name and Model Number:
Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Information on PCI-related devices are stored in the file below.
$ ls -lh /usr/share/hwdata/pci.ids -rw-r--r-- 1 root root 1.2M Mar 18 2019 /usr/share/hwdata/pci.ids
4) How to Check scsi Devices Information Using the lsscsi Command
The lsscsi stands for list small Computer System Interface. The lsscsi command lists information about SCSI/Sata devices attached to the system.
It’s scans the sysfs (mounted at /sys) pseudo file system to gather information, which was introduced in the 2.6 Linux kernel series.
$ lsscsi [2:0:0:0] disk ATA WDC WD10SPCX-24H 1A02 /dev/sda [N:0:1:1] disk SAMSUNG MZVLV256HCHP-000L2__1 /dev/nvme0n1
5) How to Check usb Devices Information Using the lsusb Command
The lsusb stands for list Universal Serial Bus or USB. It’s display information about USB buses in the system and the devices connected to them.
This will display a list of all USB devices connected to your computer such as keyboards, mouse, printers, disk drives, network adapters, etc,.
$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 174f:14e8 Syntek Bus 001 Device 004: ID 8087:0a2b Intel Corp. Bus 001 Device 002: ID 17ef:6053 Lenovo Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Details of the above output: Each line comes with four parts, it’s described below in detail.
Bus 001:
Bus NumberDevice 001:
Device NumberID 1d6b:0002:
The ID comes with two parts. The first part is showing “Manufacturer ID” and the second part is showing “Device ID”.Linux Foundation 2.0 root hub:
Device Manufacturer Name and Model Number.
Information on USB-related devices are stored in the file below.
$ ls -lh /usr/share/hwdata/usb.ids -rw-r--r-- 1 root root 595K Mar 18 2019 /usr/share/hwdata/usb.ids
6) How to Check Black Devices Information Using the lsblk Command
The lsblkk stands for list block devices. It’s display information about block devices (except RAM disks). Block devices are hard disk partition, flash drives, CD-ROM, optical drives, etc,.
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 89.5M 1 loop /var/lib/snapd/snap/core/6130 loop1 7:1 0 108.9M 1 loop /var/lib/snapd/snap/odrive-unofficial/2 loop2 7:2 0 91M 1 loop /var/lib/snapd/snap/core/6405 sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 128M 0 part └─sda2 8:2 0 931.4G 0 part /run/media/daygeek/DATA nvme0n1 259:0 0 238.5G 0 disk ├─nvme0n1p1 259:1 0 221.4G 0 part / └─nvme0n1p2 259:2 0 17G 0 part [SWAP]
7) How to Check Linux System Hardware Information Using the Dmidecode Command
Dmidecode is a tool which reads a computer’s DMI (stands for Desktop Management Interface) (some say SMBIOS – stands for System Management BIOS) table contents and display system hardware information in a human-readable format.
This table contains a description of the system’s hardware components, as well as other useful information such as serial number, Manufacturer information, Release Date, and BIOS revision, etc,.
$ sudo dmidecode -t system # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.8 present. Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: LENOVO Product Name: 80NV Version: Lenovo ideapad Y700-15ISK Serial Number: PF0MH3C2 UUID: 19e16f60-6184-1ee6-g0a0-c11b57dd58c Wake-up Type: Power Switch SKU Number: LENOVO_MT_80NV_BU_idea_FM_Lenovo ideapad Y700-15ISK Family: IDEAPAD Handle 0x001B, DMI type 15, 29 bytes System Event Log Area Length: 0 bytes Header Start Offset: 0x0000 Header Length: 8192 bytes Data Start Offset: 0x2000 Access Method: General-purpose non-volatile data functions Access Address: 0x0000 Status: Valid, Not Full Change Token: 0x12345678 Header Format: OEM-specific Supported Log Type Descriptors: 3 Descriptor 1: POST memory resize Data Format 1: None Descriptor 2: POST error Data Format 2: POST results bitmap Descriptor 3: Log area reset/cleared Data Format 3: None
8) How to Check Linux System Hardware Information Using the inxi Command
inxi is a nifty tool to check hardware information on Linux and offers wide range of option to get all the hardware information on Linux system that i never found in any other utility which are available in Linux.
It was forked from the ancient and mindbendingly perverse yet ingenius infobash, by locsmif.
$ inxi -F -x System: Host: daygeek-Y700 Kernel: 4.19.66-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 Desktop: Gnome 3.32.2 Distro: Manjaro Linux Machine: Type: Laptop System: LENOVO product: 80NV v: Lenovo ideapad Y700-15ISK serial:Mobo: LENOVO model: Allsparks 5A v: SDK0J40709 WIN serial: UEFI [Legacy]: LENOVO v: CDCN35WW date: 03/29/2016 Battery: ID-1: BAT0 charge: 40.7 Wh condition: 51.5/60.0 Wh (86%) model: SMP L14M4P23 status: Charging CPU: Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP arch: Skylake-S rev: 3 L2 cache: 6144 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 41488 Speed: 2476 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 2291 2: 2272 3: 2265 4: 2288 5: 2291 6: 2319 7: 2289 8: 2288 Graphics: Device-1: Intel HD Graphics 530 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 Device-2: NVIDIA GM107M [GeForce GTX 960M] vendor: Lenovo driver: nouveau v: kernel bus ID: 01:00.0 Display: x11 server: X.org 1.20.5 driver: intel,modesetting resolution: OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) v: 4.5 Mesa 19.1.4 direct render: Yes Audio: Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 Sound Server: ALSA v: k4.19.66-1-MANJARO Network: Device-1: Intel Wireless 8260 driver: iwlwifi v: kernel port: 5000 bus ID: 08:00.0 IF: wlp8s0 state: up mac: e4:a7:a0:32:fc:e9 Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8168 v: 8.047.02-NAPI port: 4000 bus ID: 09:00.0 IF: enp9s0 state: down mac: c8:5b:76:4d:d4:5c Drives: Local Storage: total: 1.14 TiB used: 854.18 GiB (73.0%) ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLV256HCHP-000L2 size: 238.47 GiB ID-2: /dev/sda vendor: Western Digital model: WD10SPCX-24HWST1 size: 931.51 GiB temp: 38 C Partition: ID-1: / size: 216.95 GiB used: 172.16 GiB (79.4%) fs: ext4 dev: /dev/nvme0n1p1 ID-2: swap-1 size: 17.05 GiB used: 19.6 MiB (0.1%) fs: swap dev: /dev/nvme0n1p2 Sensors: System Temperatures: cpu: 44.0 C mobo: N/A gpu: nouveau temp: 44 C Fan Speeds (RPM): N/A Info: Processes: 294 Uptime: 1d 15h 07m Memory: 15.50 GiB used: 7.20 GiB (46.5%) Init: systemd Compilers: gcc: 9.1.0 Shell: bash v: 5.0.7 inxi: 3.0.35
9) How to Check Linux System Hardware Information Using the lshw Command
lshw (stands for Hardware Lister) is a small nifty tool that generates detailed reports about various hardware components on the machine such as memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, usb, network card, graphics cards, multimedia, printers, bus speed, etc.
$ sudo lshw -short H/W path Device Class Description ================================================= system 80NV (LENOVO_MT_80NV_BU_idea_FM_Lenovo ideapad Y700-15ISK) /0 bus Allsparks 5A /0/0 memory 128KiB BIOS /0/4 processor Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz /0/4/6 memory 128KiB L1 cache /0/4/7 memory 1MiB L2 cache /0/4/8 memory 6MiB L3 cache /0/5 memory 128KiB L1 cache /0/1c memory 16GiB System Memory /0/1c/0 memory 8GiB SODIMM DDR4 Synchronous 2133 MHz (0.5 ns) /0/1c/1 memory [empty] /0/1c/2 memory 8GiB SODIMM DDR4 Synchronous 2133 MHz (0.5 ns) /0/1c/3 memory [empty] /0/100 bridge Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers /0/100/1 bridge Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) /0/100/1/0 display GM107M [GeForce GTX 960M] /0/100/2 display HD Graphics 530 /0/100/14 bus 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller /0/100/14/0 usb1 bus xHCI Host Controller /0/100/14/0/1 input Lenovo Wireless Optical Mouse N100 /0/100/14/0/6 multimedia Lenovo EasyCamera /0/100/14/0/b communication Bluetooth wireless interface /0/100/14/1 usb2 bus xHCI Host Controller /0/100/16 communication 100 Series/C230 Series Chipset Family MEI Controller #1 /0/100/17 storage HM170/QM170 Chipset SATA Controller [AHCI Mode] /0/100/1c bridge 100 Series/C230 Series Chipset Family PCI Express Root Port #2 /0/100/1c/0 generic SD/MMC Card Reader Controller /0/100/1c.2 bridge 100 Series/C230 Series Chipset Family PCI Express Root Port #3 /0/100/1c.2/0 wlp8s0 network Wireless 8260 /0/100/1c.3 bridge 100 Series/C230 Series Chipset Family PCI Express Root Port #4 /0/100/1c.3/0 enp9s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller /0/100/1d bridge 100 Series/C230 Series Chipset Family PCI Express Root Port #9 /0/100/1d/0 storage NVMe SSD Controller SM951/PM951 /0/100/1f bridge HM170 Chipset LPC/eSPI Controller /0/100/1f.2 memory Memory controller /0/100/1f.3 multimedia 100 Series/C230 Series Chipset Family HD Audio Controller /0/100/1f.4 bus 100 Series/C230 Series Chipset Family SMBus
10) How to Check Linux System Hardware Information Using the hwinfo Command
hwinfo stands for hardware information tool is another great utility that used to probe for the hardware present in the system and display detailed information about varies hardware components in human readable format.
It reports information about CPU, RAM, keyboard, mouse, graphics card, sound, storage, network interface, disk, partition, bios, and bridge, etc,., This tool could display more detailed information among others like lshw, dmidecode, inxi, etc,.
$ hwinfo --short cpu: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2250 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2285 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2466 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2280 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2156 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2446 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2261 MHz Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2257 MHz keyboard: /dev/input/event4 AT Translated Set 2 keyboard mouse: /dev/input/mice Lenovo Wireless Optical Mouse N100 /dev/input/mice SynPS/2 Synaptics TouchPad monitor: LQ156D1JX03 LCD Monitor graphics card: nVidia GM107M [GeForce GTX 960M] Intel HD Graphics 530 sound: Intel Sunrise Point-H HD Audio storage: Intel Sunrise Point-H SATA Controller [AHCI mode] Samsung Electronics NVMe SSD Controller SM951/PM951 network: enp9s0 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller wlp8s0 Intel Wireless 8260 network interface: lo Loopback network interface enp9s0 Ethernet network interface wlp8s0 Ethernet network interface disk: /dev/nvme0n1 Samsung Electronics NVMe SSD Controller SM951/PM951 /dev/sda WDC WD10SPCX-24H partition: /dev/nvme0n1p1 Partition /dev/nvme0n1p2 Partition /dev/sda1 Partition /dev/sda2 Partition usb controller: Intel Sunrise Point-H USB 3.0 xHCI Controller bios: BIOS bridge: Intel Sunrise Point-H PCI Express Root Port #2 Intel Sunrise Point-H LPC Controller Intel Skylake PCIe Controller (x16) Intel Sunrise Point-H PCI Express Root Port #4 Intel Skylake Host Bridge/DRAM Registers Intel Sunrise Point-H PCI Express Root Port #9 Intel Sunrise Point-H PCI Express Root Port #3 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 Keyboard controller Intel Sunrise Point-H PMC Intel Sunrise Point-H CSME HECI #1 O2 Micro SD/MMC Card Reader Controller Intel Sunrise Point-H SMBus /dev/input/event8 Syntek Lenovo EasyCamera
11) How to Check Partition Information Using the df Command
df command stands for Disk Filesystem. It shows detailed report of disk space usage on the Linux system.
It displays the amount of total disk space, available disk space, used disk space, disk used percentage and mounted filesystem on the Linux system.
$ df -h Filesystem Size Used Avail Use% Mounted on dev 7.8G 0 7.8G 0% /dev run 7.8G 1.7M 7.8G 1% /run /dev/nvme0n1p1 217G 173G 34G 84% / tmpfs 7.8G 662M 7.2G 9% /dev/shm tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup tmpfs 7.8G 39M 7.8G 1% /tmp /dev/loop0 90M 90M 0 100% /var/lib/snapd/snap/core/6130 /dev/loop1 109M 109M 0 100% /var/lib/snapd/snap/odrive-unofficial/2 /dev/loop2 91M 91M 0 100% /var/lib/snapd/snap/core/6405 tmpfs 1.6G 16K 1.6G 1% /run/user/120 tmpfs 1.6G 60K 1.6G 1% /run/user/1000 /dev/sda2 932G 683G 250G 74% /run/media/daygeek/DATA
12) How to Check Added Hard Disk Size Using the fdisk Command
fdisk stands for fixed disk or format disk is a cli utility that allow users to perform following actions on disks. It allows us to view, create, resize, delete, move and copy the partitions.
It understands MBR, Sun, SGI and BSD partition tables and it doesn’t understand GUID Partition Table (GPT) and it is not designed for large partitions.
fdisk allows us to create a maximum of four primary partitions per disk. One of these may be an extended partition and it holds multiple logical partitions.
$ sudo fdisk -l [sudo] password for daygeek: Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors Disk model: SAMSUNG MZVLV256HCHP-000L2 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x3000191b Device Boot Start End Sectors Size Id Type /dev/nvme0n1p1 2048 464356660 464354613 221.4G 83 Linux /dev/nvme0n1p2 464356661 500103449 35746789 17G 82 Linux swap / Solaris Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: WDC WD10SPCX-24H Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 29F85D02-5B01-435D-8C98-42B3CC2E38E1 Device Start End Sectors Size Type /dev/sda1 34 262177 262144 128M Microsoft reserved /dev/sda2 264192 1953523711 1953259520 931.4G Microsoft basic data Partition 1 does not start on physical sector boundary. Disk /dev/loop1: 108.87 MiB, 114135040 bytes, 222920 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop2: 90.102 MiB, 95416320 bytes, 186360 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop3: 89 MiB, 93327360 bytes, 182280 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
13) How to Check Mounted File Systems in Linux
These commands display the list of currently mounted file systems with details.
$ cat /etc/mtab or $ mount | column -t or $ cat /proc/mounts proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 dev /dev devtmpfs rw,nosuid,relatime,size=8115748k,nr_inodes=2028937,mode=755 0 0 run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0 /dev/nvme0n1p1 / ext4 rw,noatime 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0 cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0 pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0 cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0 cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0 cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0 cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0 cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0 cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0 cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0 systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13363 0 0 hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0 mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0 configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev 0 0 /dev/loop1 /var/lib/snapd/snap/odrive-unofficial/2 squashfs ro,nodev,relatime 0 0 /dev/loop2 /var/lib/snapd/snap/core/6405 squashfs ro,nodev,relatime 0 0 tmpfs /run/user/120 tmpfs rw,nosuid,nodev,relatime,size=1624856k,mode=700,uid=120,gid=120 0 0 tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=1624856k,mode=700,uid=1000,gid=1000 0 0 gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0 fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0 /dev/sda2 /run/media/daygeek/DATA fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0 /dev/loop3 /var/lib/snapd/snap/core/7713 squashfs ro,nodev,relatime 0 0
14) How to Check WWN Number of HBA Card Using the fdisk Command
Systool is a tool that uses APIs provided by libsysfs to gather information, view system device information by bus, class, and topology. It runs only on linux systems running kernels 2.5 or later, with the sysfs filesystem mounted.
Run the following command to find the WWN numbers for your fc host.
# systool -c fc_host -v | grep port_name port_name = "0x500143802426baf2" port_name = "0x500143802426baf3" port_name = "0x500143802426baf4" port_name = "0x500143802426baf5"
15) How to Check Sata Disk Information Using the hdparm Command
The hdparm command gets information about sata devices (hard disks).
$ sudo hdparm -i /dev/sda /dev/sda: Model=WDC WD10SPCX-24HWST1, FwRev=02.01A02, SerialNo=WD-WXD1A36RE0LP Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0 BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=off CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1953525168 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 AdvancedPM=yes: unknown setting WriteCache=enabled Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7 * signifies the current active mode
16) How to Check System Hardware Information Using the /sys Filesystem
The kernel expose some DMI information in the /sys virtual filesystem. So we can easily get the machine type by running grep command with following format.
$ sudo grep "" /sys/class/dmi/id/[pbs]* /sys/class/dmi/id/bios_date:03/29/2016 /sys/class/dmi/id/bios_vendor:LENOVO /sys/class/dmi/id/bios_version:CDCN35WW /sys/class/dmi/id/board_asset_tag:NO Asset Tag /sys/class/dmi/id/board_name:Allsparks 5A /sys/class/dmi/id/board_serial:PF0MH3C2 /sys/class/dmi/id/board_vendor:LENOVO /sys/class/dmi/id/board_version:SDK0J40709 WIN grep: /sys/class/dmi/id/power: Is a directory /sys/class/dmi/id/product_family:IDEAPAD /sys/class/dmi/id/product_name:80NV /sys/class/dmi/id/product_serial:PF0MH3C2 /sys/class/dmi/id/product_sku:LENOVO_MT_80NV_BU_idea_FM_Lenovo ideapad Y700-15ISK /sys/class/dmi/id/product_uuid:99e78f66-6418-11e6-a0a0-c85b764dd45c /sys/class/dmi/id/product_version:Lenovo ideapad Y700-15ISK grep: /sys/class/dmi/id/subsystem: Is a directory /sys/class/dmi/id/sys_vendor:LENOVO
17) How to Ethernet Device Information Using the ethtool Command
ethtool is used to query and control network device driver and hardware settings, particularly for wired Ethernet devices.
Run the following commands to know about wifi kernel driver, firmware version and bus info.
$ ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 2 Transceiver: internal Auto-negotiation: on MDI-X: on Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes
18) How to Manage HP Array Controllers Using the hpacucli Command
Hpacucli is used to create, delete and repair the logical and physical drives on the smart array controllers in HP servers.
$ hpacucli
19) How to View HP Servers Information Using the hponcfg Command
HPONCFG is an online configuration tool used to set up and reconfigure iLO without requiring a reboot of the server operating system. The utility runs in a command-line mode and must be executed from an operating system command line on the local server. HPONCFG enables you to initially configure features exposed through the RBSU or iLO.
$ hponcfg
20) How to View Dell Servers Information Using the getsysinfo Command
The Dell RACADM (Remote Access Controller Admin) utility is a command line tool that allows for remote or local management of Dell Servers.
RACADM commands allow you to view managed system information, perform power operations on the managed system, perform firmware updates, configure settings and more.
$ racadm getsysinfo
21) How to Check if a Linux System is a Physical or a Virtual Machine
These commands allow you to check whether a Linux system is a physical or virtual machine.
There are many ways we can identify this. To do so, go to the following article.
# facter virtual vmware $ sudo virt-what virtualbox kvm # imvirt Physical
One Comment on “How to Check System Configuration and Hardware Information on Linux”