View hardware configuration in Linux

Source: Internet
Author: User
Tags dmesg kingston technology

Common commands are as follows:
View the serial number of the motherboard: dmidecode | grep-I 'serial number'

Use the hardware detection program kuduz to detect the new hardware: Service kudzu start (or restart)

View CPU information: CAT/proc/cpuinfo [dmesg | grep-I 'cpu '] [dmidecode-T processor]

View memory information: CAT/proc/meminfo [Free-M] [vmstat]

View Board information: CAT/proc/PCI

View the video/sound card information: lspci | grep-I 'vga '[dmesg | grep-I 'vga']

View Nic information: dmesg | grep-I 'eth '[CAT/etc/sysconfig/hwconf | grep-I eth] [lspci | grep-I 'eth']
<! -- More -->
View PCI information: lspci (more intuitive than cat/proc/PCI)

View USB devices: CAT/proc/bus/USB/devices

View the keyboard and mouse: CAT/proc/bus/input/devices

View system hard disk information and usage: fdisk & disk-L & DF

View interrupt requests of each device (IRQ): CAT/proc/interrupts

View System Architecture: uname-

View and start the 32-bit or 64-bit Kernel Mode of the system: isalist-V [isainfo-V] [isainfo-B]

Dmidecode: displays hardware information, including bios, CPU, and memory.

Measure the refresh frequency of the current monitor:/usr/sbin/ffbconfig-rev \?

View System Configuration:/usr/platform/sun4u/sbin/prtdiag-V

View the patches applied in the current system: showrev-P

Displays the current running level: Who-Rh

View the current bind version: NSLookup-class = chaos-q = TXT version. Bind

Dmesg | more view hardware information
Lspci displays peripheral information, such as USB and nic.
Lsnod view loaded drivers
Lshw
Psrinfo-V view the type and speed of the current processor (clock speed)
Prtconf-V: print the current OBP version
Iostat-e view Hard Disk Physical information (vendor, rpm, capacity)
Prtvtoc/dev/rdsk/c0t0d0s view disk geometric parameters and partition information
DF-f ufs-o I shows the number of used and unused I-nodes
Isalist-V

For files in "/proc", you can use the File View command to browse its content. The file contains system-specific information:
CPU info host CPU Information
DMA host DMA channel information
Filesystems File System Information
Interrupts host interruption Information
Ioprots host I/O port number information
Meninfo host memory information
Version Linux memory version

Note: proc-Process Information pseudo-filesystem Process Information disguise File System

1. view all hardware information of the machine:

Dmidecode | more

Dmesg | more

The two commands have a lot of information, so we recommend that you use "| more" for ease of viewing.

2. View CPU Information

Method 1:
CPU-related parameters in Linux are stored in the/proc/cpuinfo file.
CAT/proc/cpuinfo | more
Method 2:
Run the command dmesg | grep CPU to view the startup information of the CPU.
View the number of CPUs:

Getconf long_bit

3. View mem Information

CAT/proc/meminfo | more (note the last line of output information: machinemem: 41932272 KB)

Free-m

Top

4. view disk Information

Method 1:
Fdisk-L shows the partition and size of the disk (including the USB flash disk) on the system.
Method 2:
View

CAT/proc/Partitions

5. View Nic Information

Method 1:
Ethtool eth0 can use this command to view NIC-related technical indicators
(Not all network cards support this command)
Ethtool-I eth1 and-I parameters to view the NIC Driver
You can try other parameters to view NIC-related technical parameters.
Method 2:
You can also view the NIC name (manufacturer) and other information through dmesg | grep eth0.
View/etc/sysconfig/network-scripts/ifcfg-eth0 to see the current Nic configuration including IP, gateway address and other information.
You can also run the ifconfig command.

6. How to view the motherboard information?
Lspci

7. How to mount an ISO file
Mount-o loop *. ISO mount_point
8. How to view information about a cd
Method 1:
After inserting the CD, in my rhel5 system, the CD file is/dev/CDROM,
Therefore, you only need to 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, take a closer look, the device file of the optical drive is HDC.
[Root @ miix TMP] # ls-L/dev/CDROM *
Lrwxrwxrwx 1 Root 3 01-08 08:54/dev/CDROM-> HDC
Lrwxrwxrwx 1 Root 3 01-08 08:54/dev/CDROM-HDC-> HDC
Therefore, we can mount/dev/HDC mount_point in this way.
If a valid disc is not included in the optical drive, an error is returned:
[Root @ miix TMP] # Mount/dev/HDC mount_point
Mount: media not found
9. How to view USB devices

Method 1:
In fact, you can use the fdisk-l command to view the information of the connected USB flash disk. Your USB flash 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 the USB flash drive is in the/dev/SDA, 2 GB size, and FAT32 format.

If the user logs on to the Linux GUI, the USB flash drive will not be automatically mounted.
In this case, you can manually mount ):
Mount/dev/sda1 mount_point
The above command mounts the USB flash drive to the mount_point directory of the current directory. Note that sda1 is not SDA.
The uninstall command is umount mount_point.

By default, Linux does not have a built-in drive that supports NTFS disks, but supports FAT32 well. The-T vfat parameter is generally not required for mounting.
If NTFS is supported, the-t ntfs parameter should be used for NTFs-format disk partitions.
If garbled characters occur, you can use-O iocharset = character set parameters.

You can use the lsusb command to view the USB device information:

[Root @ miix TMP] # lsusb
Bus 001 device 001: Id :0000
Bus 002 device 001: Id :0000
Bus 003 device 001: Id :0000
Bus 004 device 002: Id 0951: 1613 Kingston Technology
Bus 004 device 001: Id :0000

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.