Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to check if it is a virtual machine by linux

Shulou Source: shulou.com Published: 2022-05-31 11:10:22 10月03日 Update

In this article, the editor introduces in detail "how to check whether linux is a virtual machine". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to check whether linux is a virtual machine" can help you solve your doubts.

View method: 1, execute the "dmidecode-s system-product-name" command, if the output "VMware Virtual Platform" is a virtual machine; 2, execute the "lscpu" command, if there is a "VMware" in the output information, it is a virtual machine.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

To see if the Linux server is a virtual machine, you can use the following two methods

1. Dmidecode-s system-product-name

Physical machine:

[root@swnode1] # dmidecode-s system-product-nameI840-GS

Virtual machines:

[root@gnntdb DbBackup] # dmidecode-s system-product-nameVMware Virtual Platform

2. Lscpu

If you forget the host ip of the virtual machine, how can you find it? If there is a switch, locate it under the switch by looking at the interface information and arp list.

After reading this, the article "how to check whether linux is a virtual machine" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Tags: Articles switches information content commands methods outputs appropriate can make host host ideas interfaces tutorials new knowledge more servers steps physics environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Xiaomi Docker NVidia MariaDB