Linux下lshw,lsscsi,lscpu,lsusb,lsblk硬件查看命令
注意:如有提示命令找不到command not found,请自行安装所需命令。
1、lshw查看所有硬件摘要信息
下面命令可以查看所有硬件摘要信息,并输出成一个html文件,把此html文件导出到电脑上,直接打开,可以清楚的看到硬件信息:
[root@localhost /]# lshw -html > /hardware.html |
2、lsscsi查看SCSI控制器设备的信息
可以看到Raid卡信息和所有虚拟磁盘以及光驱的信息,如果没有硬件SCSI控制器,那就不会返回信息:
[root@localhost /]# lsscsi [0:2:0:0] disk DELL PERC H730P Mini 4.27 /dev/sda [0:2:1:0] disk DELL PERC H730P Mini 4.27 /dev/sdb [0:2:2:0] disk DELL PERC H730P Mini 4.27 /dev/sdc [10:0:0:0] cd/dvd PLDS DVD+-RW DS-8ABSH LD51 /dev/sr0 |
3、lscpu查看CPU信息
[root@localhost /]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 16 On-line CPU(s) list: 0-15 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 79 Model name: Intel(R) Xeon(R) CPU E5-2609 v4 @ 1.70GHz Stepping: 1 CPU MHz: 1699.930 BogoMIPS: 3399.52 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 20480K NUMA node0 CPU(s): 0,2,4,6,8,10,12,14 NUMA node1 CPU(s): 1,3,5,7,9,11,13,15 |
4、lsusb查看USB接口设备信息
[root@localhost /]# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:800a Intel Corp. Bus 002 Device 002: ID 8087:8002 Intel Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard Bus 003 Device 003: ID 045e:0084 Microsoft Corp. Basic Optical Mouse Bus 003 Device 004: ID 413c:a001 Dell Computer Corp. Hub |
5、lsblk查看块设备信息
[root@localhost /]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 200G 0 disk ├─sda1 8:1 0 2G 0 part /boot ├─sda2 8:2 0 127G 0 part / └─sda3 8:3 0 62.5G 0 part [SWAP] sdc 8:32 0 223G 0 disk └─sdc1 8:33 0 223G 0 part /oldstore sdb 8:16 0 21.1T 0 disk └─sdb1 8:17 0 21.1T 0 part /store sr0 11:0 1 1024M 0 rom
|