OS Manuals

/usr/bin/systemd-run

The systemd System and Service Manager

From systemd 262.2-r1 (os), captured 2026-11-05 by running systemd-run --help (exit 0). permalink

> systemd-run [OPTION…] COMMAND [ARGUMENTS…]

Run the specified command in a transient scope or service.

Options:
  -h --help                       Show this help
     --version                    Show package version
     --no-ask-password            Do not prompt for password
     --user                       Run as user unit
     --system                     Talk to the service manager (implied default)
  -H --host=[USER@]HOST           Operate on remote host
  -M --machine=CONTAINER          Operate on local container
  -C --capsule=NAME               Operate on specified capsule
     --scope                      Run this as scope rather than service
  -u --unit=UNIT                  Run under the specified unit name
  -p --property=NAME=VALUE        Set service or scope unit property
     --description=TEXT           Description for unit
     --slice=SLICE                Run in the specified slice
     --slice-inherit              Inherit the slice from the caller
     --expand-environment=BOOL    Control expansion of environment variables
     --no-block                   Do not wait until operation finished
  -r --remain-after-exit          Leave service around until explicitly stopped
     --wait                       Wait until service stopped again
     --send-sighup                Send SIGHUP when terminating
     --service-type=TYPE          Service type
     --uid=USER                   Run as system user
     --gid=GROUP                  Run as system group
     --nice=NICE                  Nice level
     --working-directory=PATH     Set working directory
  -d --same-dir                   Inherit working directory from caller
     --root-directory=PATH        Set root directory
  -R --same-root-dir              Inherit root directory from caller
  -E --setenv=NAME[=VALUE]        Set environment variable
  -t --pty                        Run service on pseudo TTY as STDIN/STDOUT/STDERR
  -T --pty-late                   Just like --pty, but leave TTY access to agents until unit is
                                  started up
  -P --pipe                       Pass STDIN/STDOUT/STDERR directly to service
  -q --quiet                      Suppress information messages during runtime
  -v --verbose                    Show unit logs while executing operation
     --output=MODE                Controls formatting of verbose logs, see journalctl for valid
                                  values
     --json=FORMAT                Generate JSON output (pretty, short, or off)
  -G --collect                    Unload unit after it ran, even when failed
  -S --shell                      Invoke a $SHELL interactively
     --job-mode=MODE              Specify how to deal with already queued jobs, when queueing a new
                                  job
     --ignore-failure             Ignore the exit status of the invoked process
     --background=COLOR           Set ANSI color for background
     --no-pager                   Do not start a pager

Path options:
     --path-property=NAME=VALUE   Set path unit property

Socket options:
     --socket-property=NAME=VALUE Set socket unit property

Timer options:
     --on-active=SECONDS          Run after SECONDS delay
     --on-boot=SECONDS            Run SECONDS after machine was booted up
     --on-startup=SECONDS         Run SECONDS after systemd activation
     --on-unit-active=SECONDS     Run SECONDS after the last activation
     --on-unit-inactive=SECONDS   Run SECONDS after the last deactivation
     --on-calendar=SPEC           Realtime timer
     --on-timezone-change         Run when the timezone changes
     --on-clock-change            Run when the realtime clock jumps
     --timer-property=NAME=VALUE  Set timer unit property

See the systemd-run(1) man page for details.
Options (51)
OptionDescriptionSource
-h --helpShow this helphelp
--versionShow package versionhelp
--no-ask-passwordDo not prompt for passwordhelp
--userRun as user unithelp
--systemTalk to the service manager (implied default)help
-H --host=[USER@]HOSTOperate on remote hosthelp
-M --machine=CONTAINEROperate on local containerhelp
-C --capsule=NAMEOperate on specified capsulehelp
--scopeRun this as scope rather than servicehelp
-u --unit=UNITRun under the specified unit namehelp
-p --property=NAME=VALUESet service or scope unit propertyhelp
--description TEXTDescription for unithelp
--slice SLICERun in the specified slicehelp
--slice-inheritInherit the slice from the callerhelp
--expand-environment BOOLControl expansion of environment variableshelp
--no-blockDo not wait until operation finishedhelp
-r --remain-after-exitLeave service around until explicitly stoppedhelp
--waitWait until service stopped againhelp
--send-sighupSend SIGHUP when terminatinghelp
--service-type TYPEService typehelp
--uid USERRun as system userhelp
--gid GROUPRun as system grouphelp
--nice NICENice levelhelp
--working-directory PATHSet working directoryhelp
-d --same-dirInherit working directory from callerhelp
--root-directory PATHSet root directoryhelp
-R --same-root-dirInherit root directory from callerhelp
-E --setenv=NAME[=VALUESet environment variablehelp
-t --ptyRun service on pseudo TTY as STDIN/STDOUT/STDERRhelp
-T --pty-lateJust like --pty, but leave TTY access to agents until unit is started uphelp
-P --pipePass STDIN/STDOUT/STDERR directly to servicehelp
-q --quietSuppress information messages during runtimehelp
-v --verboseShow unit logs while executing operationhelp
--output MODEControls formatting of verbose logs, see journalctl for valid valueshelp
--json FORMATGenerate JSON output (pretty, short, or off)help
-G --collectUnload unit after it ran, even when failedhelp
-S --shellInvoke a $SHELL interactivelyhelp
--job-mode MODESpecify how to deal with already queued jobs, when queueing a new jobhelp
--ignore-failureIgnore the exit status of the invoked processhelp
--background COLORSet ANSI color for backgroundhelp
--no-pagerDo not start a pagerhelp
--path-property NAME=VALUESet path unit propertyhelp
--on-active SECONDSRun after SECONDS delayhelp
--on-boot SECONDSRun SECONDS after machine was booted uphelp
--on-startup SECONDSRun SECONDS after systemd activationhelp
--on-unit-active SECONDSRun SECONDS after the last activationhelp
--on-unit-inactive SECONDSRun SECONDS after the last deactivationhelp
--on-calendar SPECRealtime timerhelp
--on-timezone-changeRun when the timezone changeshelp
--on-clock-changeRun when the realtime clock jumpshelp
--timer-property NAME=VALUESet timer unit propertyhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.