systemd-detect-virt
Detect execution in a virtualized environment. More information: https://www.freedesktop.org/software/systemd/man/latest/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
- Only detect container virtualization:
systemd-detect-virt
- Only detect hardware virtualization:
systemd-detect-virt
- Detect whether in a
chrootenvironment:
systemd-detect-virt
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
