All the Linux hardware information is a focus of attention when we use this system. Here we will introduce the CPU, memory size, hard disk, Nic, and so on. To view all Linux hardware information, pay attention to the parameters following each command. The parameters have different effects.
1. How to view the CPU type and related features?
Method 1:
CPU-related parameters in Linux are stored in the/proc/cpuinfo file,
View the file content to know the CPU-related technical parameters.
Method 2:
Run the command dmesg | grep CPU to view the startup information of the CPU.
To view the number of CPU bits, you can call getconf LONG_BIT. The value is either 32-bit or 64-bit :)
2. How can I view the memory size and usage?
Method 1:
View the/proc/meminfo file directly
Method 2:
Use the free-m command to view the information, as shown below:
[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
We can see that the total memory is 748 M, 738 M is used, 9 M is idle, and the swap space is not used yet.
In fact, my physical memory is MB, and some memory and video card are shared.
Method 3:
Use the top command to view the real-time memory usage.
3. How can I view the hard disk model and related parameters?
Method 1:
Fdisk-l shows the partition and size of the disk (including the USB flash disk) on the system.
Method 2:
View the/proc/partitions file directly.
Method 3:
Run hdparm-I/dev/hda to obtain detailed physical parameters of the hard disk.
4. How do I view Nic information?
Method 1:
Ethtool eth0 can use this command to view NIC-related technical indicators
I have tested that 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-. s/ifcfg-eth0
The current Nic configuration includes IP address, gateway address, and other information.
You can also run the ifconfig command.
5. How to view information about 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 BootStartEndBlocksId 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
6. How can I 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
7. How to mount an ISO file?
Method:
Mount-o loop *. iso mount_point
8. How do I view the motherboard information?
Run the lspci command.
- Linux mounting commands
- Detailed command 1 for running Linux background)
- Comprehensive parsing of Linux profile files
- Detailed parsing of Linux directory structure
- Summary: how to install Oracle in Linux