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 does Linux view the hardware configuration

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

Share

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

This article mainly analyzes the relevant knowledge points of Linux how to view the hardware configuration, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "how to view the hardware configuration of Linux".

In the Linux system, there are many commands to view hardware information, some commands can only print specific hardware component information such as CPU and memory, while others can view information about a variety of hardware components.

Linux View the specific method of hardware configuration

1. View all the hardware information of the machine:

Dmidecode | more

Dmesg | more

There is a lot of information from these two commands, so it is recommended to use "| more" later for easy viewing.

two。 View CPU information

Method 1: CPU-related parameters under Linux are saved in / proc/cpuinfo file cat / proc/cpuinfo | more method 2: use the command dmesg | grep CPU can view the startup information of the relevant CPU and check the number of CPU digits:

Getconf LONG_BIT

3. View Mem information

Cat / proc/meminfo | more (note the last line of the output message: MachineMem: 41932272 kB)

Free-m

Top

4. View disk information

Method 1: fdisk-l can see the partition and size information of the disk (including U disk) on the system. Method 2: check directly

Cat / proc/partitions

5. View network card information

Method 1: ethtool eth0 uses this command to see the technical specifications related to the network card (not necessarily all network cards support this command) ethtool-I eth2 plus-I parameters to view the network card driver can try other parameters to view the network card related technical parameters method 2: you can also see the network card name (manufacturer) and other information through dmesg | grep eth0 and other information by viewing / etc/sysconfig/network-scripts / ifcfg-eth0 can see that the current Nic configuration includes IP, Information such as gateway address. Of course, you can also view it through the ifconfig command.

6. How do I view motherboard information? Lspci

7. How to mount the ISO file mount-o loop .iso mount_point8. How to view CD-ROM related information method 1: after inserting CD CD, in my RHEL5 system, the CD file is / dev/cdrom, so only mount / dev/cdrom mount_point is needed. [root@miix tmp] # mount / dev/cdrom mount_point mount: block device / dev/cdrom is write-protected, mounting read-only actually take a closer look, the device file of the optical drive is hdc [root@miix tmp] # ls-l / dev/cdrom lrwxrwxrwx 1 root root 3 01-08 08:54 / dev/cdrom- > hdc lrwxrwxrwx 1 root root 3 01-08 08:54 / dev/cdrom-hdc-> hdc, so we can do the same mount / dev/hdc mount_point if there is no valid CD in the drive Error: [root@miix tmp] # mount / dev/hdc mount_point mount: media not found 9. How to view USB device dependencies

Method 1: in fact, the accessed USB disk information can be viewed through the fdisk-l command. My USB disk information is as follows:

Disk / dev/sda: 2012 MB, 2012217344 bytes 16 heads, 32 sectors/track, 7676 cylinders Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System / dev/sda1 * 16 7676 1961024 b W95 FAT32

The device file of U disk is / dev/sda,2G size, FAT32 format.

If the user is not logged in to the Linux graphical interface, the U disk will not be automatically mounted. At this point, you can mount the flash drive to the mount_point directory of the current directory by mount: mount / dev/sda1 mount_point above command. Note that sda1 is not sda. The uninstall command is umount mount_point

Linux does not have a drive that supports NTFS format disk by default, but it supports FAT32 well. Generally, the-t vfat parameter is not required when mounting. If ntfs is supported, the-t ntfs parameter should be used for disk partitions in ntfs format. If there is garbled, consider using the-o iocharset= character set parameter.

You can view USB device information through the lsusb command:

[root@miix tmp] # lsusb Bus 001 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 004 Device 002: ID 0951:1613 Kingston Technology Bus 004 Device 001: ID 0000:0000

This is the end of the introduction on "how to view the hardware configuration of Linux". More related content can be searched for previous articles, hoping to help you answer questions and questions, please support the website!

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