Home > Article > Operation and Maintenance > How to check if linux is a virtual machine
View method: 1. Execute the "dmidecode -s system-product-name" command. If "VMware Virtual Platform" is output, it is a virtual machine; 2. Execute the "lscpu" command. If there is " VMware" is a virtual machine.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
To check whether 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-name I840-GS
Virtual machine:
[root@gnntdb DbBackup]# dmidecode -s system-product-name VMware Virtual Platform
2. lscpu
If you forget the host IP of the virtual machine, how to retrieve it? If there is a switch, locate it by viewing the interface information and arp list under the switch.
The above is the detailed content of How to check if linux is a virtual machine. For more information, please follow other related articles on the PHP Chinese website!