Home >Operation and Maintenance >Linux Operation and Maintenance >How to determine whether a Linux server is a virtual machine or a physical machine

How to determine whether a Linux server is a virtual machine or a physical machine

王林
王林Original
2019-12-27 17:03:488911browse

How to determine whether a Linux server is a virtual machine or a physical machine

Enter the following command in the terminal:

dmidecode -S system-product-name

or

Ishw -class system

or (free online video tutorial sharing: linux video tutorial )

dmesg | grep -i virtual

If the result returned contains virtual, it is a virtual machine, as shown below:

How to determine whether a Linux server is a virtual machine or a physical machine

If the result returned is as follows, based on hardware, it means it is a physical machine.

How to determine whether a Linux server is a virtual machine or a physical machine

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to determine whether a Linux server is a virtual machine or a physical machine. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn