mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-22 01:07:33 +03:00
systemd-run: add page (#9949)
* systemd-run: add page * systemd-run: fix minor typo * systemd-run: reorder wording to reduce ambiguity * systemd-run: apply review suggestions Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> --------- Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
parent
18fb7ac920
commit
36e2578753
24
pages/linux/systemd-run.md
Normal file
24
pages/linux/systemd-run.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# systemd-run
|
||||||
|
|
||||||
|
> Run programs in transient units.
|
||||||
|
> More information: <https://manned.org/systemd-run>.
|
||||||
|
|
||||||
|
- Start a transient service:
|
||||||
|
|
||||||
|
`sudo systemd-run {{command}} {{argument1 argument2 ...}}`
|
||||||
|
|
||||||
|
- Start a transient service under the service manager of the current user (no privileges):
|
||||||
|
|
||||||
|
`systemd-run --user {{command}} {{argument1 argument2 ...}}`
|
||||||
|
|
||||||
|
- Start a transient service with a custom unit name and description:
|
||||||
|
|
||||||
|
`sudo systemd-run --unit={{name}} --description={{string}} {{command}} {{argument1 argument2 ...}}`
|
||||||
|
|
||||||
|
- Start a transient service that does not get cleaned up after it terminates with a custom environment variable:
|
||||||
|
|
||||||
|
`sudo systemd-run --remain-after-exit --set-env={{name}}={{value}} {{command}} {{argument1 argument2 ...}}`
|
||||||
|
|
||||||
|
- Start a transient timer that periodically runs its transient service (see `man systemd.time` for calendar event format):
|
||||||
|
|
||||||
|
`sudo systemd-run --on-calendar={{calendar_event}} {{command}} {{argument1 argument2 ...}}`
|
Loading…
Reference in New Issue
Block a user