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

How to use the command line to view hardware information on Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "how to use the command line to view hardware information on Linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use the command line to view hardware information on Linux.

There are many commands that can be used to check and view hardware information in Linux. Some of these commands can output specific hardware and information, such as CPU and memory. This tutorial lists some common commands for viewing hardware information on Linux to help you quickly output hardware configuration details.

1.lscpu

Lscpu can view information about CPU and processing units in Linux and use it directly. It has no extra options or features.

Lscpu

After execution, you will see the following output:

2.lspci

Lspci is another common tool for viewing hardware information in Linux. It can list all the details connected to the PCI bus, such as video cards, network cards, USB interfaces, SATA controllers and other devices.

Lspci

The output of using this command directly is as follows:

Of course, you can also use commands like the following to filter out specific device information:

Lspci-v | grep "VGA"-A 12

3.lshw

Lshw is a general-purpose tool that can execute details of multiple hardware such as CPU, memory, USB controller, and disk. Lshw automatically extracts information from different "/ proc" files after execution.

Lshw-short

The output after the command is executed, similar to the following:

4.lsusb

The lsusb command displays the details of connecting to the USB controller of this computer, and by default the lsusb command outputs only brief summary information. You can use the-v option to output the details of each USB port:

Lsusb

The default output is as follows:

5.Inxi

Inxi is a scripting tool that can obtain multi-project hardware information. It can input a detailed hardware report for the user. By default, Inxi is not installed on the Ubuntu system, we can install it with the following command:

Sudo apt-get install inxi

Once installed, you can directly use the following command to output the hardware report:

Inxi-Fx

6.df

The df command outputs various partitions and their mount points in the current Linux system, and displays a summary of the free space for each partition, which we can use with the-H parameter.

Df-H

7.free

Use the free command to view the memory information of the current system. To view the total memory and free space, you can use the free command:

Free-m

8.dmidecode

The dmidecode command works differently from other gadgets that view hardware information in Linux. It mainly extracts hardware information by reading data from the DMI table.

To view CPU information using the dmidecode command, you can use:

Sudo dmidecode-t processor

To view memory information, you can use:

Sudo dmidecode-t memory

To view "BIOS" information, run:

Sudo dmidecode-t bios

9.hdparm

The hdparm command outputs information about SATA devices, such as hard drives:

Sudo hdparm

After the command is executed, the output looks like this:

At this point, I believe you have a deeper understanding of "how to use the command line to view hardware information on Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Servers

Wechat

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

12
Report