Method: 1. Use the dmidecode command to determine. This command can obtain information about the hardware. The syntax is "dmidecode -s system-product-name"; 2. Use the lscpu command to determine. This command can display the CPU for details, the syntax is "lscpu options".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How to determine whether Linux is a virtual machine
1. dmidecode -s system-product-name
dmidecode Command allows you to obtain information about hardware under Linux system. The function of dmidecode is to decode the information in the DMI database and display it in readable text. Since DMI information can be modified manually, the information inside may not be accurate information of the system. dmidecode follows the SMBIOS/DMI standard, and the information it outputs includes BIOS, system, motherboard, processor, memory, cache, etc.
2. lscpu
The lscpu command can display detailed information about the CPU, such as: CPU manufacturer, architecture, CPU quantity, model, main frequency and Cache and other information.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to determine whether Linux is a virtual machine. For more information, please follow other related articles on the PHP Chinese website!