Linux hardware configuration information

 

After looking for N on the Internet for a long time, I found a good document, reprint it:

1. View all 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

2. View CPU information

   Method 1:
   The CPU-related parameters under Linux are saved in the /proc/cpuinfo file
   cat /proc/cpuinfo |more
   Method 2:
   Use the command  dmesg | grep CPU  to check the startup information of the relevant CPU.
   Check the number of bits of the CPU:

   getconf LONG_BIT

3. View Mem information

 cat /proc/meminfo |more (note the last line of the output: 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 Use this command to view the technical indicators related to the network card
   (not necessarily all network cards support this command)
   ethtool -i eth1 plus the -i parameter to view the network card driver ,
   you can try other parameters to view the technical parameters of the network card
   Method 2: You can also  see the network card name (manufacturer) and other information
   through dmesg | grep eth0 , etc.    By viewing  /etc/sysconfig/network-scripts/ifcfg-eth0, you can see the current network card configuration including IP, gateway address and other information.    Of course, it can also be viewed through the ifconfig command.

6. How to check the motherboard information?
 lspci

7. How to mount the ISO file
mount -o loop *.iso mount_point
8. How to check the CD-related information
   Method 1:
   After inserting the CD, in my RHEL5 system, the CD file is /dev/cdrom,
   so just mount / dev/cdrom mount_point is enough.
   [root@miix tmp]# mount /dev/cdrom mount_point
   mount: block device /dev/cdrom is write-protected, mounting read-only
   In fact, look carefully, 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 mount as well /dev/hdc mount_point
   If there is no valid CD in the CD-ROM drive, an error will be reported:
   [root@miix tmp]# mount /dev/hdc mount_point
   mount: Media not found
9. How to check USB device related

   Method 1:
   In fact, you can view the information of the connected U disk through the fdisk -l command. My U 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    The device file of W95 FAT32 U disk is /dev/sda, 2G size, FAT32 format.    If the user does not log in to the Linux GUI, the U disk will not be automatically mounted.    At this time, you can manually mount (mount):    mount /dev/sda1 mount_point    The above command mounts the U disk to the mount_point directory of the current directory. Note that sda1 is not sda.    The unmount command is umount mount_point    Linux does not come with a driver that supports NTFS formatted disks by default, but it supports FAT32 well, and the -t vfat parameter is generally not required when mounting.    If ntfs is supported, the -t ntfs parameter should be used for ntfs formatted disk partitions.
   



   


   

   





   


   If there is garbled characters, you can consider using the -o iocharset= character set parameter.    You can view the 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
   

   





After looking for N on the Internet for a long time, I found a good document, reprint it:

1. View all 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

2. View CPU information

   Method 1:
   The CPU-related parameters under Linux are saved in the /proc/cpuinfo file
   cat /proc/cpuinfo |more
   Method 2:
   Use the command  dmesg | grep CPU  to check the startup information of the relevant CPU.
   Check the number of bits of the CPU:

   getconf LONG_BIT

3. View Mem information

 cat /proc/meminfo |more (note the last line of the output: 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 Use this command to view the technical indicators related to the network card
   (not necessarily all network cards support this command)
   ethtool -i eth1 plus the -i parameter to view the network card driver ,
   you can try other parameters to view the technical parameters of the network card
   Method 2: You can also  see the network card name (manufacturer) and other information
   through dmesg | grep eth0 , etc.    By viewing  /etc/sysconfig/network-scripts/ifcfg-eth0, you can see the current network card configuration including IP, gateway address and other information.    Of course, it can also be viewed through the ifconfig command.

6. How to check the motherboard information?
 lspci

7. How to mount the ISO file
mount -o loop *.iso mount_point
8. How to check the CD-related information
   Method 1:
   After inserting the CD, in my RHEL5 system, the CD file is /dev/cdrom,
   so just mount / dev/cdrom mount_point is enough.
   [root@miix tmp]# mount /dev/cdrom mount_point
   mount: block device /dev/cdrom is write-protected, mounting read-only
   In fact, look carefully, 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 mount as well /dev/hdc mount_point
   If there is no valid CD in the CD-ROM drive, an error will be reported:
   [root@miix tmp]# mount /dev/hdc mount_point
   mount: Media not found
9. How to check USB device related

   Method 1:
   In fact, you can view the information of the connected U disk through the fdisk -l command. My U 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    The device file of W95 FAT32 U disk is /dev/sda, 2G size, FAT32 format.    If the user does not log in to the Linux GUI, the U disk will not be automatically mounted.    At this time, you can manually mount (mount):    mount /dev/sda1 mount_point    The above command mounts the U disk to the mount_point directory of the current directory. Note that sda1 is not sda.    The unmount command is umount mount_point    Linux does not come with a driver that supports NTFS formatted disks by default, but it supports FAT32 well, and the -t vfat parameter is generally not required when mounting.    If ntfs is supported, the -t ntfs parameter should be used for ntfs formatted disk partitions.
   



   


   

   





   


   If there is garbled characters, you can consider using the -o iocharset= character set parameter.    You can view the 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
   

   





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324903841&siteId=291194637