Writing /var/lib/dokuwiki/data/meta/tutorials/systemd-nspawn.meta failed
tutorials:systemd-nspawn
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorials:systemd-nspawn [2016/09/30 07:01] – dgarcia | tutorials:systemd-nspawn [2022/09/20 00:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Debian | + | ======Chroot using systemd-nspawn====== |
| ===== Installation ===== | ===== Installation ===== | ||
| - | This tutorial is for creating a Debian | + | This tutorial is for creating a minimal Linux chroot inside a Linux distro |
| First we need to install some dependencies: | First we need to install some dependencies: | ||
| - | sudo pacman | + | sudo apt-get install |
| | | ||
| - | Depending on you distro, you may use aptitude | + | Depending on you distro, you may use another package manager to install instead. Now that we have debootstrap, |
| sudo mkdir -p /var/chroot | sudo mkdir -p /var/chroot | ||
| sudo debootstrap --arch amd64 jessie /var/chroot http:// | sudo debootstrap --arch amd64 jessie /var/chroot http:// | ||
| | | ||
| - | The chroot is now installed and fully functional. | + | After this, the chroot is installed and fully functional. |
| ===== Using for the first time ===== | ===== Using for the first time ===== | ||
| - | In order to access the internal Debian, use: | + | In order to access the chroot for the first time, use: |
| sudo systemd-nspawn -D /var/chroot | sudo systemd-nspawn -D /var/chroot | ||
| | | ||
| - | This will let you to use Debian | + | This will let you to use the chroot |
| ===== Usage ===== | ===== Usage ===== | ||
| + | |||
| + | To boot a chroot inside a [[https:// | ||
| + | |||
| + | sudo systemd-nspawn -D /var/chroot -b | ||
| + | | ||
| + | This will give you a login screen, so log in as your user. | ||
| + | |||
| + | To log more terminals to this container, use: | ||
| + | |||
| + | sudo machinectl login chroot | ||
tutorials/systemd-nspawn.1475218904.txt.gz · Last modified: 2022/09/20 00:08 (external edit)