Skip to content

Instantly share code, notes, and snippets.

@brunerd
Created November 5, 2018 22:13
Show Gist options
  • Save brunerd/9819a07ebb213f504eefee7d0add472a to your computer and use it in GitHub Desktop.
Save brunerd/9819a07ebb213f504eefee7d0add472a to your computer and use it in GitHub Desktop.
#!/bin/bash
#macOS - returns 0 or 1 depending on if we are a running in a VM or not
grep -c VMM <<< $(sysctl -n machdep.cpu.features)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment