In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to view all the hardware information of Linux". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to view all the hardware information of Linux".
1. How do I view CPU types and related features?
Method 1:
Parameters related to CPU under Linux are saved in / proc/cpuinfo file.
Looking at the contents of the file, you can know the technical parameters related to CPU.
Method 2:
Use the command dmesg | grep CPU to view the startup information of the relevant CPU
To check the number of bits in CPU, you can getconf LONG_BIT either 32 or 64 bits:)
2. How to check the memory size and usage?
Method 1:
View / proc/meminfo file directly
Method 2:
Use the free-m command to view, as follows:
[root@miix proc] # free-m
Total used free shared buffers cached
Mem: 748 738 9 0 121 304
-/ + buffers/cache: 313 435
Swap: 768 0 768
You can see that the total memory is 748m, 738m is used, 9m is free, and the swap space is 768m unused.
In fact, my physical memory is 768m, and some memory is shared with the graphics card.
Method 3:
You can also see real-time memory usage using the top command.
3. How to check the hard disk model and related parameters?
Method 1:
Fdisk-l can see the partition and size information of the disks (including USB drives) on the system.
Method 2:
View the / proc/partitions file directly.
Method 3:
Obtain the detailed physical parameters of the hard disk by using the command hdparm-I / dev/hda
4. How to check the information related to the network card?
Method 1:
Ethtool eth0 can look up the technical specifications related to the network card by using this command.
(I have tested that not all network cards support this command.)
Ethtool-I eth2 plus-I parameter to view the Nic driver
You can try other parameters to view the technical parameters related to the network card.
Method 2:
You can also see information such as the name of the network card (manufacturer) through dmesg | grep eth0, etc.
By viewing / etc/sysconfig/network-.s/ifcfg-eth0
You can see the current Nic configuration, including IP, gateway address and other information.
Of course, you can also view it through the ifconfig command.
5. How to view information about USB devices?
Method 1:
In fact, you can view the information of the accessed USB disk 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 BootStartEndBlocksId 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 (mount) manually:
Mount / dev/sda1 mount_point
The above command mounts the flash drive to the mount_point directory of the current directory. 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
6. How to view the information related to the CD?
Method 1:
After inserting the CD disc, in my RHEL5 system, the CD file is / dev/cdrom
So all you need is mount / dev/cdrom mount_point.
[root@miix tmp] # mount / dev/cdrom mount_point
Mount: block device / dev/cdrom is write-protected, mounting read-only
In fact, if you 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 also do this mount / dev/hdc mount_point
If there is no valid CD in the CD drive, an error will be reported:
[root@miix tmp] # mount / dev/hdc mount_point
Mount: media not found
7. How to mount the ISO file?
Methods:
Mount-o loop * .iso mount_point
8. How to view the motherboard information?
Just use the command lspci
Thank you for your reading, the above is the content of "how to view all the hardware information of Linux". After the study of this article, I believe you have a deeper understanding of how to view all the hardware information of Linux. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.