Launch a one-off command as a transient service unit.

Section: Transient Units and Resource Controls

Run transient service

bash
bash
systemd-run --unit=myjob --remain-after-exit /usr/bin/sleep 60
Explanation

Launch a one-off command as a transient service unit.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Transient Units and Resource Controls
Run process in transient scope
Run an interactive process in its own transient scope unit.
OpenIn sheetbashsame section
Set CPU quota on service
Apply runtime resource-control properties to a unit.
OpenIn sheetbashsame section
Set memory cap on service
Limit service memory through cgroup controls.
OpenIn sheetbashsame section
Show service status
Show status, recent logs, and the service main PID.
OpenIn sheetbash1 tag match
Show logs for a service
Read recent logs associated with one systemd unit.
OpenIn sheetbash1 tag match
Start a service
Start a service unit.