Files
cheatsheet-tldr/tldr/linux/machinectl
2025-12-22 00:22:43 +00:00

27 lines
621 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# machinectl
> Control the systemd machine manager.
> Execute operations on virtual machines, containers, and images.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/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}}`