How to check if you are running in a VM with linux

On Linux you can use the command virt-what

[root@myhost]# virt-what
vmware