System hardware check linux

How can I find my hardware details?

Is there any built-in software or terminal method allowing me to view the hardware profiles on my system? Windows equivalent of such a feature would be Device Manager.

19 Answers 19

    lspci will show you most of your hardware in a nice quick way. It has varying levels of verbosity so you can get more information out of it with -v and -vv flags if you want it. The -k argument is a good way to find out which kernel driver a piece of hardware is using. -nn will let you simply know the hardware ID which is great for searching. But it is only a very simple, quick way of getting a list of hardware. I often ask people to post the output of it here when trying to identify their wireless hardware. It’s great for things like that. It doesn’t show USB hardware other than the USB busses. Here are three real world examples:

Graphics:

$ lspci -nnk | grep VGA -A1 03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF110 [GeForce GTX 580] [10de:1080] (rev a1) Kernel driver in use: nvidia 

Audio:

$lspci -v | grep -A7 -i "audio" 00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio Subsystem: Acer Incorporated [ALI] Device 080d Flags: bus master, fast devsel, latency 0, IRQ 34 Memory at f0940000 (64-bit, non-prefetchable) [size=16K] Capabilities: Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel -- 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02) Subsystem: Acer Incorporated [ALI] Device 080d Flags: bus master, slow devsel, latency 32, IRQ 35 Memory at f0944000 (64-bit, non-prefetchable) [size=16K] Capabilities: Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel 

Networking:

$ lspci -nnk | grep net -A2 00:0a.0 Ethernet controller [0200]: NVIDIA Corporation MCP79 Ethernet [10de:0ab0] (rev b1) Subsystem: Acer Incorporated [ALI] Device [1025:0222] Kernel driver in use: forcedeth -- 05:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) [168c:001c] (rev 01) Subsystem: AMBIT Microsystem Corp. AR5BXB63 802.11bg NIC [1468:0428] Kernel driver in use: ath5k 

Of course this is usually a lot of information. You often only need info on a small subset of your hardware and lshw will let you select a category. If you just wanted to see your network devices, for example, run this:

sudo apt-get install hardinfo 

Источник

Читайте также:  Условное выполнение команд linux

12 Commands to Check Linux System & Hardware Information

12 Commands to Check Linux System & Hardware Information

Whether you are a Linux beginner user who wants to learn new commands or a frequent user who only needs a quick reminder, this tutorial is for you.

In this article we’ll explain 12 typical commands to check Linux system and hardware information.

Table of Contents

System info

You can know the system name or kernel name, system version or release, host or hardware name using the uname command with the -a flag.

You should get an input similar to mine:

Linux bytexd 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Linux: system name,
  • bytexd: network host name,
  • 5.13.0-41-generic: kernel release
  • #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022: kernel version, and
  • x86_64: hardware name

The kernel is a program at the operating system’s core to control every system operation. The code lives in the memory to manage hardware and software interactions. For example, the kernel boots the system, device drivers, or charges and stops charging the device.

The SMP, short for Symmetrical Multi-processing, means a multiprocessor architecture with no CPU chosen as the main one. So from the above output, kernel version is 33 on Ubuntu version 20.04, dated seventh February at 2:25 p.m, 2022, in UTC time.

Alternatively, you can get info about specific components by running their respective commands.

File system

Use the fdisk command with the sudo command and the -l flag to check the file system partitions.

A partition is a logical hard disk division. The operating and file systems treat the divisions as a separate entity and manage them as if they are distinct hard drives.

Besides, the fdisk command modifies the file system distributions.

Notes/Articles/12 Commands to Check Linux System & Hardware Information/file system partitions.png

Hardware info

The lshw tool with the sudo command helps know the machine’s detailed hardware configuration. For instance, you can use the tool to inquire about the motherboard, RAM, or cache configurations, firmware version, bus speed, and CPU and speed.

Notes/Articles/12 Commands to Check Linux System & Hardware Information/show hardware info.png

Apart from the long list of settings, you can get a summarized configuration data by appending the -short flag to the lshw command.

The motherboard glues the system together, easing their intercommunication. RAM holds the currently used data, which fades when you switch off the computer. On the other hand, the cache is a small and fast memory component inserted between the RAM and the CPU to hold the frequently used data.

Читайте также:  Linux deploy установка kde

In the absence of power, the firm software, short for firmware , holds the low-level instructions. It lies on the motherboard, hosting hardware, and BIOS settings.

As the name suggests, the bus joins the computer components, enabling data transfer. Lastly, the processor (also known as the CPU ) executes instructions, such as arithmetic and control functions.

Now that you understand the primary hardware components, let’s check them.

Memory, BIOS, and Processor

4. dmidecode

The dmidecode command with the sudo command and the -t flag checks the system, CPU, memory and BIOS information. You can use it to check the target component’s information, as follows.

sudo dmidecode -t processor

Notes/Articles/12 Commands to Check Linux System & Hardware Information/components info.png

Apart from the -t flag, you can specify the ID from DMI table to get information about a specific hardware component. For example, appending code 0 after the -t flag reveals the BIOS information.

Bonus Commands

The free command with the -m flag shows you the total, used and free memory on your device.

The df command with the -H flag reveals the file system’s partitions, mount points and disk spaces.

Notes/Articles/12 Commands to Check Linux System & Hardware Information/free memory and disk space.png

CPU information

Use the lscpu command to check the CPU information.

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): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz Stepping: 9 CPU MHz: 4199.996 BogoMIPS: 8399.99 Hypervisor vendor: KVM Virtualization type: full L1d cache: 64 KiB L1i cache: 64 KiB L2 cache: 512 KiB L3 cache: 16 MiB NUMA node0 CPU(s): 0,1 Vulnerability Itlb multihit: KVM: Mitigation: VMX unsupported Vulnerability L1tf: Mitigation; PTE Inversion Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown Vulnerability Meltdown: Mitigation; PTI Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling Vulnerability Srbds: Not affected 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 mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nons top_tsc cpuid tsc_known_freq pni ssse3 cx16 pcid sse4_1 sse4_2 hypervisor lahf_lm invpcid_single pti fsgsbase invpcid md_clear flush_l1d arch_capabilities
  • Architecture is the arrangement of the CPU components.
  • CPU op-mode(s) is the Linux version the system runs. If you see both 32 and 64-bit modes, your machine runs a 64-bit system. If you only see 32-bit, the computer is 32-bit.
  • Byte Order of Little Endian value means my system prioritizes the least significant data units when ordering data in the memory. CPU(s) symbolize the number of cores assigned to the system, 4 in my system.
Читайте также:  Kali linux и arduino

USB Controllers

USB controllers let a USB device communicate with the computer. You can check their information using the lsusb command.

lsusb -v # for detailed information

Notes/Articles/12 Commands to Check Linux System & Hardware Information/usb info.png

SATA

Short for Serial Advanced Technology Attached, SATA is an interface to transfer data between storage devices and the motherboard. It is preferred to PATA (Parallel Commands to Check Linux System & Hardware Information) because it is quicker in data transfer.

You can check SATA disk info like serial number and model by specifying the device path after the sudo and hdparm command.

The dev folder contains files attached to the local system. Most of its files are partitioned in alphabetical order.

For example, /dev/sda is the primary hard drive while /dev/sdb is secondary. The numbers after the drive name denote the partition order. For example, /dev/sda1 represents the first drive’s first partition.

SCSI devices

Short for Small Computer System Interface, SCSI is a set of standards to physically connect to and transfer data between peripheral devices and computers.

You can also use the lsscsi to list SATA and SCSI devices.

lsscsi -s # to show device sizes

In Linux, SCSI devices are named to help identify them. Like the SATA devices, the SCSI devices are labelled in alphabetical order. For example, /dev/scd0 is the first SCSI device.

If your system does not have the lsscsi tool, install it using your system’s installation package.

Block devices

A block device moves data in byte/bit sequences. Examples of block devices are CD-ROM, flash, or hard drives. You can physically attach the devices to the computer and access them remotely.

Use the lsblk command to list the block devices.

Notes/Articles/12 Commands to Check Linux System & Hardware Information/block devices.png

PCI devices

A Peripheral Component Interconnect (PCI) joins various peripheral devices to the Linux platform. Any device connecting to the PCI slot is called a PCI device. You can find more about the devices by running the lspci command.

lspci -v # for detailed information

Conclusion

There are many commands to check the Linux system and hardware information. As shown in this tutorial, you can comfortably remember the typical commands by understanding and grouping related devices.

Источник

Оцените статью
Adblock
detector