ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 如何判断当前主机是物理机还是虚拟机?

如何判断当前主机是物理机还是虚拟机?

原创 Linux操作系统 作者:595117995 时间:2017-08-01 16:22:50 0 删除 编辑

Windows:

在CMD里输入:Systeminfo | findstr /i "System Model"

如果System Model:后面含有Virutal就是虚拟机,其他都是物理机

或者用powershell命令:get-wmiobject win32_computersystem | fl model

Linux:

在bash里输入:dmidecode -s system-product-name

或者dmesg | grep -i virtual

具体参考:http://unix.stackexchange.com/questions/89714/easy-way-to-determine-virtualization-technology

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28291944/viewspace-2142918/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2016-10-13

  • 博文量
    99
  • 访问量
    125416