一、作用
获取有关硬件方面的信息
dmidecode命令的作用是以一种可读的方式显示机器
的DMI(Desktop Management Interface)信息, 其输出
的信息包括 BIOS、系统、主板、处理器、内存、缓存等等,
既可以得到当前的配置,也可以得到系统支持的最大配置,
比如说支持的最大内存数等
二、选项
- -d 从设备文件读取信息,输出内容与不加参数标准输出相同
- -h 显示帮助信息
- -s 只显示指定的DMI字符串信息
- -V 显示版本信息
- -t 只显示指定条目的信息
三、实例
```shell [root@localhost ~]# dmidecode -t 1dmidecode 3.2
Getting SMBIOS data from sysfs. SMBIOS 2.7 present.
Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: VMware, Inc. Product Name: VMware Virtual Platform Version: None Serial Number: VMware-56 4d e9 24 59 21 12 d4-23 ae 25 2b 6c 17 f9 41 UUID: 24e94d56-2159-d412-23ae-252b6c17f941 Wake-up Type: Power Switch SKU Number: Not Specified Family: Not Specified
```shell
[root@localhost ~]# dmidecode -s system-serial-number
VMware-56 4d e9 24 59 21 12 d4-23 ae 25 2b 6c 17 f9 41
[root@localhost ~]# dmidecode -t processor |grep Core |tail -4
Version: Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
Core Count: 2
Core Enabled: 2
Multi-Core