machinectl

Control the systemd machine manager. Execute operations on virtual machines, containers and images. More information: <https://www.freedesktop.org/software/systemd/man/machinectl.html>.

Install

All systems
curl cmd.cat/machinectl.sh
Debian Debian
apt-get install systemd-container
Ubuntu
apt-get install systemd-container
Arch Arch Linux
pacman -S systemd
image/svg+xml Kali Linux
apt-get install systemd-container
CentOS
yum install systemd
Fedora
dnf install systemd-container
Windows (WSL2)
sudo apt-get update sudo apt-get install systemd-container
Raspbian
apt-get install systemd-container

Control the systemd machine manager. Execute operations on virtual machines, containers and images. More information: <https://www.freedesktop.org/software/systemd/man/machinectl.html>.

  • Start a machine as a service using `systemd-nspawn`:
    sudo machinectl start machine_name
  • Stop a running machine:
    sudo machinectl stop machine_name
  • Display a list of running machines:
    machinectl list
  • Open an interactive shell inside the machine:
    sudo machinectl shell machine_name

© tl;dr; authors and contributors