MACHINECTL(1) machinectl MACHINECTL(1) machinectl - systemd machinectl [OPTIONS...] {COMMAND} [NAME...] machinectl systemd-machined.service(8) systemd(1) . machinectl . : o (VMs) (OS) ( ) . o . o . UNIX DNS. . -- -- . : o /usr/ /etc/ . o btrfs . o "" MBR GPT . o MBR GPT . o . importctl(1). : list (). list-images ( ). ".host" . --all . 206. status NAME... . . show . . 206. show [NAME...] . . NAME . . --all . --property=. . status . 206. start NAME... systemd-nspawn(1). systemd-nspawn@.service systemctl start . systemd-nspawn /var/lib/machines/ ( ) . list-images ( ) . systemd-machined.service(8) systemd-nspawn . machinectl systemd-nspawn. . systemd-nspawn . machinectl poweroff. 219. login [NAME] . . ".host" ( ) . TTY getty . systemd(1) . . shell ( ) systemd-run(1) --machine= . 209. shell [[NAME@]NAME [PATH [ARGUMENTS...]]] . . ".host" ( ) . login . /bin/sh . --uid= "@". --setenv= . machinectl shell / . systemd-run ( ). shell ( ) su(1) su . utmp . systemd-run(1) --machine= machinectl shell / . --wait systemd-run . --pty systemd-run machinectl shell. systemd-run . systemd-run machinectl shell. 225. enable NAME..., disable NAME... systemd-nspawn(1). systemd-nspawn@.service systemctl enable systemctl disable . . . --now. 219. poweroff NAME... . SIGRTMIN+4 systemd . stop poweroff. systemd(1) sysvinit. terminate ( ) . 212. reboot NAME... . SIGINT Ctrl+Alt+Del . restart reboot. 209. terminate NAME... . . poweroff . 206. kill NAME... . . --kill-whom= . --signal= . 206. bind NAME PATH [PATH] . . . --read-only . --mkdir . systemd-nspawn(1) (--private-users). AF_UNIX FIFOs. 219. copy-to NAME PATH [PATH] --force . . . (UID/GID 0). 219. copy-from NAME PATH [PATH] --force . . . (UID/GID 0). 219. list-images . /var/lib/machines/ ( ). start ( ) . ("."). --all. ".host" . 219. image-status [NAME...] . . show-image ( ) . 219. show-image [NAME...] . . NAME . . --all . --property=. . image-status . 219. edit NAME|FILE . systemd.nspawn(5). edit /etc/systemd/nspawn/. 254. cat NAME|FILE . 254. clone NAME NAME . . btrfs . . . . --read-only . 219. rename NAME NAME . . 219. read-only NAME [BOOL] ( ) . . . 219. remove NAME... . ".host" . 219. set-limit [NAME] BYTES ( ). . . . . K M G T . "-" . btrfs. 220. clean ( ). /var/lib/machines/ . machinectl list-images --all . --all . /var/lib/machines/. importctl pull-tar importctl pull-raw . machinectl clean . 230. : -p --property= . . "Name". . 206. --value show "=". 230. -P --value --property= "=". -P -p/--property=. 256. -a --all . ("."). . 206. -l --full . --max-addresses=full. 206. --kill-whom= kill . leader supervisor all . all. 206. -s --signal= kill . SIGTERM SIGINT SIGSTOP. SIGTERM. "help" "list" . --uid= shell . shell . "root" . login ( ). 225. -E [=] --setenv=[=] shell . . "=" VALUE . login. 230. --mkdir bind (bind mount). FIFO. 219. --read-only bind (bind mount) . clone . 219. -n --lines= status . . 10. 219. -o --output= status . journalctl(1). "short". 219. --runner=nspawn|vmspawn systemd-nspawn(1) systemd-vmspawn(1). systemd-nspawn(1) . 256. -V -V --runner=vmspawn. 256. --now enable disable . . 253. --force . 219. --max-addresses= list-machines IP . 1. "all". 0 . "..." . 232. -q --quiet . 236. -H --host= . "@" . ssh ":" "/" . SSH . machinectl -H . IPv6 . -M --machine= systemd-machined.service(8) . 235. --no-pager (pager). --no-legend . --no-ask-password . -h --help . --version . machinectl . DNS UNIX/Linux. . . . . 64 . ".host" . . machinectl list --all. UTF-8 ( ) . . ".host" . ".host" . machinectl list-images --all. /var/lib/machines/ /usr/local/lib/machines/ /usr/lib/machines/. /var/lib/container/ . /usr/ . /var/lib/machines/ machinectl. btrfs. systemd-nspawn(1) machinectl : o . o ( btrfs) . . o "" GPT MBR. ".raw". systemd-nspawn(1) --directory= --image=. Example 1. Download an Ubuntu RAW image, set a root password in it, start it as a service # importctl pull-raw -mN \ https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img \ jammy # systemd-firstboot --image=/var/lib/machines/jammy.raw --prompt-root-password --force # machinectl start jammy # machinectl login jammy .raw "jammy". systemd-firstboot(1). . . 0 . $SYSTEMD_LOG_LEVEL ( ). . ( ) emerg alert crit err warning notice info debug 0 7. syslog(3) . console syslog kmsg journal (: SYSTEMD_LOG_LEVEL=debug,console:info debug info). . $SYSTEMD_LOG_COLOR . tty . journalctl(1) . $SYSTEMD_LOG_TIME . . journalctl(1) . $SYSTEMD_LOG_LOCATION . . . . $SYSTEMD_LOG_TID . (TID). . . $SYSTEMD_LOG_TARGET . : console ( ) console-prefixed ( "" syslog(3) kmsg ( ) journal ( ) journal-or-kmsg ( kmsg ) auto ( ) null ( ). $SYSTEMD_LOG_RATELIMIT_KMSG kmsg . . "true". systemd kmsg. $SYSTEMD_PAGER $PAGER --no-pager. $SYSTEMD_PAGER $PAGER. $SYSTEMD_PAGER $PAGER less(1) more(1) . . "cat" --no-pager. : $SYSTEMD_PAGERSECURE $SYSTEMD_PAGER $PAGER ( "cat" "") . $SYSTEMD_LESS less ( "FRSXMK"). : K Ctrl+C. less Ctrl+C . $SYSTEMD_LESS "K" less Ctrl+C . X termcap . . . $LESS less systemd. less(1) . $SYSTEMD_LESSCHARSET less ( "utf-8" UTF-8). $LESSCHARSET less systemd. $SYSTEMD_PAGERSECURE (pager) less(1) "" . sudo(8) pkexec(1) . . " " ( ). " " --no-pager PAGER=cat . . (true) " " . " " LESSSECURE=1 . less(1) " ". false (pager). SYSTEMD_PAGERSECURE=0 . $SYSTEMD_PAGERSECURE systemd " " . " " (UID) geteuid(2) sd_pid_get_owner_uid(3) sudo(8) ($SUDO_UID [1]). SYSTEMD_PAGERSECURE=1 " " . . $SYSTEMD_PAGERSECURE . $SYSTEMD_PAGER $PAGER $SYSTEMD_PAGERSECURE . $SYSTEMD_COLORS (boolean) . ( ) systemd . $COLORTERM "truecolor" "24bit" 24 256 $NO_COLOR $TERM . true $NO_COLOR. false . "16" "256" "24bit" ANSI 16 256 24 . "auto-16" "auto-256" "auto-24bit" $TERM . $SYSTEMD_URLIFY . . systemd $TERM . systemd(1) systemd-machined.service(8) systemd-nspawn(1) systemd.special(7) importctl(1) tar(1) xz(1) gzip(1) bzip2(1) zstd(1) 1. $SUDO_UID . 3 . . : . systemd 260.1 MACHINECTL(1)