Experimente systemd-run
:
# systemd-nspawn -D <machine-root> -b 3 --link-journal host
# systemd-run --machine <machine-name> env
Running as unit run-1356.service.
# journalctl --machine <machine-name> -u run-1356 -b -q
Oct 30 07:45:09 jessie-64 systemd[1]: Started /usr/bin/env.
Oct 30 07:45:09 jessie-64 env[37]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Trecho da página de manual :
Use shell (see below) or systemd-run(1) with the --machine= switch to directly invoke a single command, either interactively or in the background.
(O comando shell
disponível desde v225 )