Created
March 4, 2014 19:03
-
-
Save ggrandes/9353295 to your computer and use it in GitHub Desktop.
Get Linux System UID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Works on any machine with 1 ethernet (eth0) | |
cat /sys/class/net/eth0/address | |
# Works on { VMWARE, Baremetal, KVM (if setted with -uuid %s) }, Fail on { AWS/XEN } | |
cat /sys/devices/virtual/dmi/id/product_uuid | |
dmidecode -s system-uuid | |
# Works on { VMWARE, Baremetal }, Fail on { AWS/XEN, KVM } | |
cat /sys/devices/virtual/dmi/id/product_serial | |
# Works on { AWS/XEN }, Fail on { VMWARE, Baremetal, KVM } | |
cat /sys/hypervisor/uuid | |
curl http://169.254.169.254/latest/meta-data/instance-id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's no longer the case with AWS, please see the testing we did to improve Weave Net.