systemd-nspawn -D /mnt/rootfs

Category: Administration

systemd-nspawn -D /mnt/rootfs

Boot a directory tree as a lightweight container

Starts a container using /mnt/rootfs as its root, running its init or a shell without full virtualization. This is a quick way to test a root filesystem, effectively chroot with process and PID isolation. Exit the container shell to stop it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.