Linux 常见命令

查看当前CPU数量

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 

查看是物理机还是虚拟机

 dmesg | grep -i virtual   ###一般用这个有内容说明是虚拟机 没有东西说明是物理机

或者:dmidecode -s system-product-name
或者:lshw -class system

未完待续。。。。。。

原文地址:https://www.cnblogs.com/fang888/p/11764520.html