In this tutorial, we will see the command used to know if we are working on a virtual or physical machine (a machine here stands for a computer). This command will use the dmidecode utility to retrieve hardware information of your computer via the BIOS.
- Launch the terminal as root and run this command:
dmidecode | grep Product
Here is the result for a VMware-based machine:
Product Name: VMware Virtual Platform
* For a VirtualBox-based machine, you will see this result:
Product Name: VirtualBox
* For a physical (real) machine, you will see this result:
Product Name: 965P-DQ6
965P-DQ6 is the model of my computer's motherboard. That's it.