How would know at command line that the Linux host i logged in to is real machine, with linux installed, or is a virtual machine Thanks, -Kamal.
Asked
Active
Viewed 520 times
2
-
possible duplicate of [VMware Linux Server -- how can you tell if you are a vm or real hardware?](http://serverfault.com/questions/65718/vmware-linux-server-how-can-you-tell-if-you-are-a-vm-or-real-hardware) – EEAA Oct 10 '10 at 14:52
4 Answers
7
Try the 'lspci' command; on a virtual machine you'll typically see a bunch of devices that are obviously virtual (e.g. vendor is VMWare or such).

janneb
- 3,841
- 19
- 22
3
I usually use
dmidecode --type 1
For scripting you might try
dmidecode -s system-manufacturer

Cakemox
- 25,209
- 6
- 44
- 67
0
Often uname -a
will display information that gives you a hint - references to Xen will tell you that you are in that type of virtual machine.

Paul McMillan
- 1,219
- 1
- 8
- 17
-
virtual:Linux dhcp11-167.sfeng.home.com 2.6.32.11sf.p4-4 #1 SMP Fri Sep 17 20:22:25 UTC 2010 i686 GNU/Linux – kamal Oct 10 '10 at 06:05
-
real: Linux bamboo.sd.home.com 2.6.32.11sf.pentM-4 #1 PREEMPT Fri Sep 17 19:50:44 UTC 2010 i686 GNU/Linux – kamal Oct 10 '10 at 06:06
-
5`uname -a` certainly won't give you any help if it's running on a VMware server. – EEAA Oct 10 '10 at 14:54
-