How to find out if you are on a virtual server or a physical server

How can we know if we are running a physical server or a virtual server. There are times when we don’t know where our server is installed and we have to show if it is a physical hardware on a dedicated server or a virtual server (Vmware, Proxmox, LXC, HyperV, …).

The command to execute with root privileges is:

dmidecode -t system

With this command we can see all the details of the machine, where we can read ‘manufacturer’ as VMware and it is clear that it is a virtual machine and if on the other hand it appears DELL or HPE (for example) it means that we do not have virtualisation applied.

dmidecode
How to find out if you are on a virtual server or a physical server

The dmidecode command is really useful for finding much more hardware information.

dmidecode is a Linux command line tool that allows you to extract information from the BIOS (Basic Input Output System) configuration table of your computer. This tool is used to obtain detailed information about memory, processors, storage controllers, motherboards, etc. This tool is also used to verify hardware compatibility, perform hardware audit, diagnose hardware problems and troubleshoot hardware related problems. When running the dmidecode command, detailed information about memory, processors, storage controllers, motherboards, etc. is displayed. This information can be useful in identifying the specific hardware components installed in the computer.

To use dmidecode, first open a terminal window. Then, type the command “dmidecode”. This will show you a list of the types of information that can be obtained from the system. For example, if you want to see the manufacturer information, type:

Translated with DeepL.com (free version)

$ sudo dmidecode -s "system-manufacturer"

This will show you the name of the system manufacturer. If you want to see the motherboard information, type:

$ sudo dmidecode -t "baseboard"

For more information on dmidecode, see the online documentation.

Scroll to Top