mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-24 02:51:55 +00:00
Update cheatsheets
This commit is contained in:
21
tldr/linux/systemctl-add-requires
Normal file
21
tldr/linux/systemctl-add-requires
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl add-requires
|
||||
|
||||
> Add `Requires` dependencies to a target for one or more units.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#add-wants%20TARGET%0A%20%20%20%20%20%20%20%20%20%20UNIT%E2%80%A6>.
|
||||
|
||||
- Add a `Requires` dependency from a target to a unit:
|
||||
|
||||
`systemctl add-requires {{target}} {{unit}}`
|
||||
|
||||
- Add multiple `Requires` dependencies at once:
|
||||
|
||||
`systemctl add-requires {{target}} {{unit1 unit2 ...}}`
|
||||
|
||||
- Add a user-level `Requires` dependency:
|
||||
|
||||
`systemctl --user add-requires {{target}} {{unit}}`
|
||||
21
tldr/linux/systemctl-add-wants
Normal file
21
tldr/linux/systemctl-add-wants
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl add-wants
|
||||
|
||||
> Add `Wants` dependencies to a target for one or more units.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#add-wants%20TARGET%0A%20%20%20%20%20%20%20%20%20%20UNIT%E2%80%A6>.
|
||||
|
||||
- Add a `Wants` dependency from a target to a unit:
|
||||
|
||||
`systemctl add-wants {{target}} {{unit}}`
|
||||
|
||||
- Add multiple `Wants` dependencies at once:
|
||||
|
||||
`systemctl add-wants {{target}} {{unit1 unit2 ...}}`
|
||||
|
||||
- Add a user-level `Wants` dependency:
|
||||
|
||||
`systemctl --user add-wants {{target}} {{unit}}`
|
||||
25
tldr/linux/systemctl-bind
Normal file
25
tldr/linux/systemctl-bind
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl bind
|
||||
|
||||
> Ephemerally bind-mount a file or directory from the host into a unit's mount namespace.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#%0A%20%20%20%20%20%20%20%20%20%20%20%20bind%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT%0A%20%20%20%20%20%20%20%20%20%20%20%20PATH%0A%20%20%20%20%20%20%20%20%20%20%20%20%5BPATH%5D%0A%20%20%20%20%20%20%20%20%20%20>.
|
||||
|
||||
- Bind-mount a host path into the same location inside the unit:
|
||||
|
||||
`systemctl bind {{unit}} /{{path/to/host_directory}}`
|
||||
|
||||
- Bind-mount a host path into a different location inside the unit:
|
||||
|
||||
`systemctl bind {{unit}} /{{path/to/host_directory}} /{{path/to/unit_directory}}`
|
||||
|
||||
- Bind-mount a path as read-only inside the unit:
|
||||
|
||||
`systemctl bind --read-only {{unit}} /{{path/to/host_directory}}`
|
||||
|
||||
- Create the destination path inside the unit before binding:
|
||||
|
||||
`systemctl bind --mkdir {{unit}} /{{path/to/host_directory}} /{{path/to/unit_directory}}`
|
||||
Reference in New Issue
Block a user