Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux to see how hardware information

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of how Linux view hardware information, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this Linux to view how to hardware information article. Let's take a look at it.

Method 1: use the dmidecode command

Dmidecode is a read computer DMI (desktop management interface)

Desktop Management Interface

A tool that contains table contents and displays system hardware information in a human-readable format (others say it is to read SMBIOS-system management BIOS

System Management BIOS

)

This table contains descriptions of the hardware components of the system, as well as other useful information such as serial numbers, manufacturers, release dates, and BIOS revision numbers.

The DMI table not only describes the current system composition, but also reports possible upgrade information (such as the fastest CPU or maximum memory capacity that can be supported).

This will help analyze your hardware compatibility, such as whether the latest version of the program is supported.

# dmidecode-t system# dmidecode 2.1 SMBIOS entry point at 0x7e7bf000SMBIOS 2.7 present.Handle 0x0024, DMI type 1,27 bytesSystem InformationManufacturer: IBMProduct Name: System x2530 M4:-[1214AC1]-Version: 0BSerial Number: 762A99BF-6916-450F-80A6-B2E9E78FC9A1Wake-up Type: Power SwitchSKU Number: Not SpecifiedFamily: System XHandle 0x004B, DMI type 12,5 bytesSystem Configuration OptionsOption 1: JP20 pin1-2: TPM PP Disable, pin2-3: TPM PP EnableHandle 0x004D, DMI type 32, 20 bytesSystem Boot InformationStatus: No errors detected method 2: use the inxi command

Inxi is a clever gadget for viewing hardware information on Linux. It provides a large number of options to get all the hardware information, which I have never seen in other existing Linux toolsets. It comes from the ancient but hitherto flexible infobash fork written by locsmif.

Inxi is a script that can quickly display system hardware, CPU, driver, Xorg, desktop, kernel, GCC version, process, memory usage and a large number of other useful information. It can also be used as a technical support and debugging tool.

# inxi-MMachine: Device: server System: IBM product: n serial A v: 0B serial: MK2RL11Mobo: IBM model: 00Y8494 serial: 37M17D UEFI: IBM v:-[VVE134MUS-1.50]-date: 08 37M17D UEFI 30max 2013 method 3: use the lshw command

Lshw (of hardware listeners)

Hardware Lister

) is a small and flexible tool that can generate detailed reports on various hardware components in machines such as memory configuration, firmware version, motherboard configuration, CPU version and speed, cache configuration, USB, network card, video card, multimedia, printer, and bus speed.

It generates hardware information by reading the contents of various files and DMI tables in the / proc directory.

Lshw must be run with superuser privileges to detect complete hardware information, otherwise it reports only part of the information. There is a special option called class in lshw that displays specific hardware information in detailed mode.

# lshw-C systemenal-dbo01tdescription: Bladeproduct: System x2530 M4:-[1214AC1]-vendor: IBMversion: 0Bserial: MK2RL11width: 64 bitscapabilities: smbios-2.7 dmi-2.7 vsyscall32configuration: boot=normal chassis=enclosure family=System X uuid=762A99BF-6916-450F-80A6-B2E9E78FC9A1 method 4: use / sys file system

The kernel exposes some DMI information in files in the / sys directory. Therefore, we can easily get the machine type by running the grep command as follows.

# grep "" / sys/class/dmi/id/ [pbs] * or you can use the cat command to print out only specific details. # cat / sys/class/dmi/id/board_vendorIBM# cat / sys/class/dmi/id/product_nameSystem x2530 M4:-[1214AC1]-# cat / sys/class/dmi/id/product_serialMK2RL11# cat / sys/class/dmi/id/bios_version- [VVE134MUS-1.50] method 5: use the dmesg command

The dmesg command is used to log kernel messages (startup messages) on Linux before syslogd or klogd starts. It gets the data by reading the kernel's ring buffer. Dmesg is useful when troubleshooting problems or just trying to get system hardware information.

# dmesg | grep-I DMIDMI: System x2530 M4:-[1214AC1]-/ 00Y8494, BIOS-[VVE134MUS-1.50]-08 VVE134MUS-1.50 30Universe 2013 method 6: use the hwinfo command

Hwinfo (hardware information

Hardware information

Is another great tool for detecting the hardware stored in the current system and displaying the details of various hardware modules in a human-readable manner.

It reports information about CPU, memory, keyboard, mouse, video card, sound card, storage, network interface, disk, partition, BIOS, and bridge. It can display more detailed information than other tools such as lshw, dmidecode, or inxi.

Hwinfo uses the libhd library libhd.so to collect hardware information on the system. The tool was specially designed for openSuse and was later included in its official repository by other distributions.

# hwinfo | egrep "system.hardware.vendor | system.hardware.product" system.hardware.vendor = 'IBM'system.hardware.product =' System x2530 M4:-[1214AC1]-'this is the end of the article on "how to View hardware Information on Linux". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to view hardware information on Linux". If you want to learn more, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report