System Grab Bag

View all TLDR pages from Linux (or from all pages)

systemd-detect-virt

Detect execution in a virtualized environment. More information: https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html.
  • List detectable virtualization technologies:
    systemd-detect-virt --list
  • Detect virtualization, print the result and return a zero status code when running in a VM or a container, and a non-zero code otherwise:
    systemd-detect-virt
  • Silently check without printing anything:
    systemd-detect-virt --quiet
  • Only detect container virtualization:
    systemd-detect-virt --container
  • Only detect hardware virtualization:
    systemd-detect-virt --vm

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.