machinectl
TLDR
List running machines
$ machinectl list
Start a machine$ sudo machinectl start machine_name
Stop a running machine$ sudo machinectl stop machine_name
Open interactive shell in machine$ sudo machinectl shell machine_name
Login to a machine$ sudo machinectl login machine_name
Show machine status$ machinectl status machine_name
Execute command in machine$ sudo machinectl shell machine_name /bin/command
SYNOPSIS
machinectl [OPTIONS] COMMAND [NAME...]
DESCRIPTION
machinectl controls the systemd machine manager. It manages local containers and virtual machines through systemd-machined, including starting, stopping, and interacting with them.
PARAMETERS
-p, --property
Show specific property-a, --all
Show all properties-q, --quiet
Suppress output--uid USER
User to run shell command as-E, --setenv VAR=VALUE
Set environment variable in shell-H, --host
Execute on remote host-M, --machine
Execute in container
COMMANDS
list
List running machinesstatus NAME
Show machine runtime statusshow NAME
Show machine propertiesstart NAME
Start a machine as systemd servicestop NAME
Stop a running machinepoweroff NAME
Power off a machinereboot NAME
Reboot a machineterminate NAME
Terminate a machine immediatelykill NAME
Send signal to machine processeslogin NAME
Open login prompt to machineshell [[USER@]NAME [COMMAND...]]
Open shell or run command in machinecopy-to NAME PATH [PATH]
Copy files to machinecopy-from NAME PATH [PATH]
Copy files from machinebind NAME PATH [PATH]
Bind mount directory into machinelist-images
List available machine imagesimage-status NAME
Show image statuspull-raw URL [NAME]
Download raw disk imagepull-tar URL [NAME]
Download tar imageimport-raw FILE [NAME]
Import raw disk imageimport-tar FILE [NAME]
Import tar archiveremove NAME
Remove machine image
CAVEATS
Machines are typically started using systemd-nspawn. The shell command requires systemd-machined to be running. Container images are stored in /var/lib/machines/.
HISTORY
machinectl is part of systemd, providing container and VM management through systemd-machined and systemd-nspawn.
SEE ALSO
systemd-machined(8), systemd-nspawn(1), systemctl(1)


