命令查看系统信息
参考链接:https://linux.cn/article-9932-1.html
windows | linux | |||
PC品牌 | wmic computersystem get Manufacturer | /sys/devices/virtual/dmi/id/sys_vendor | ||
PC序列号 | wmic bios get serialnumber | /sys/devices/virtual/dmi/id/product_serial | ||
硬盘序列号 | wmic diskdrive get SerialNumber | 查看有多少个硬盘,同一个硬盘的分区开头一样 sudo fdisk -l #查看每个分区的序列号 sudo hdparm -i /dev/sda | grep SerialNo sudo hdparm -i /dev/sdb | grep SerialNo sudo hdparm -i /dev/sdc | grep SerialNo |
||
PC型号 | wmic computersystem get Model | /sys/devices/virtual/dmi/id/product_name | ||
主板序列号 | wmic BaseBoard get serialnumber | /sys/devices/virtual/dmi/id/board_serial | ||
Cpu序列号 | wmic cpu get ProcessorID | sudo dmidecode -t 4 | grep ID | ||
内存序列号 | wmic memorychip get serialnumber | sudo dmidecode -t memory | grep Serial | ||