This article mainly shares with you how to check the hardware configuration information in Linux. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to have a look.
1.View all hardware information of the machine:
## dmidecode |more
dmesg |more
The information from these 2 commands are all There are a lot of ,, so it is recommended to use "|more" for easy viewing
##2.View CPUInformation
##Method 1: Under Linux
CPU related parameters are saved in /proc/cpuinfo In the file cat /proc/cpuinfo |more
Method 2
: Use the command
dmesg | grep CPU to view the startup of the related CPU Information View the number of bits of
CPU:
getconf LONG_BIT##3.
ViewMemInformation cat/proc/meminfo |more
(Note the last line of the output information:MachineMem: 41932272 kB) free -m
top
##4.
View disk informationMethod 1
: fdisk -l You can see The partitions and sizes of disk
(including Udisk) on the system are related information. Method 2:
View directly
##cat /proc/partitions
5.View network card information
Method 1: 6.How to check the motherboard information? 7.How to mountISOFile Method 1: Related recommendations: View hardware architecture under linux
ethtool eth0 Use this command to view the technical indicators related to the network card
(Not all network cards may support this command)
ethtool -i eth1 plus -i Parameters to view the network card driver
You can try other parameters to view the relevant technical parameters of the network card
Method 2:
You can also see the network card name through dmesg | grep eth0 etc.(Manufacturer) and other information
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, you can also view it through the ifconfig command.
lspci
mount -o loop *.isomount_point
8.How to view Disc related information
Method 1:
InsertCD After disc, in my RHEL5 system, the CD file is /dev/cdrom ,
So just mount/dev/cdrom mount_point .
[root@miix tmp]# mount /dev/cdrom mount_point
mount: block device /dev/cdrom is write-protected, mountingread-only
In fact, if you 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 also do this mount /dev/hdcmount_point
If a valid CD is not placed in the optical drive, an error will be reported:
[root@miix tmp]# mount /dev/hdc mount_point
mount: Media not found
9.How to checkUSBDevice related
In fact, you can view it through the fdisk -l command To access the U disk information, 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 W95 FAT32
The device file of U disk is /dev/sda, 2G size, FAT32 format.
If the user is not logging in to the Linux graphical interface, UThe disk will not be automatically mounted.
You can mount it manually at this time(mount):
mount /dev /sda1 mount_point
The above command will mount the U disk to the mount_point directory in the current directory. Note that sda1 is not sda.
The uninstall command is umountmount_point
Linuxdoes not have built-in support by defaultNTFS format disk driver, but has good support for FAT32, generally not needed when mounting -t vfat parameter.
If ntfs is supported, the disk partition in the ntfs format should be Use -t ntfs parameters.
If garbled characters appear, you can consider using the -o iocharset=character set parameter.
You can view the USB device information through the lsusb command Oh:
[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
The above is the detailed content of How to check hardware configuration information in Linux. For more information, please follow other related articles on the PHP Chinese website!