获取硬盘序列号

fdisk -l |grep "Disk identifier" |awk {'print $3'}

获取CPU序列号

dmidecode -t 4 | grep ID |sort -u |awk -F': ' '{print $2}'