systemd-nspawn
Spawn a command or OS in a lightweight container. More information: https://www.freedesktop.org/software/systemd/man/latest/systemd-nspawn.html.
- Run a command in a container:
systemd-nspawn
- Run a full Linux-based OS in a container:
systemd-nspawn
- Run the specified command as PID 2 in the container (as opposed to PID 1) using a stub init process:
systemd-nspawn
- Specify the machine name and hostname:
systemd-nspawn --hostname
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
