How to check if linux is a virtual machine

青灯夜游
Release: 2022-03-02 15:35:15
Original
12596 people have browsed it

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.

How to check if linux 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
Copy after login

Virtual machine:

[root@gnntdb DbBackup]# dmidecode -s system-product-name
VMware Virtual Platform
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template