2025-12-16 10:20:31 -07:00
|
|
|
# systemctl edit
|
|
|
|
|
|
|
|
|
|
> Edit systemd unit files.
|
2026-02-18 06:55:01 -07:00
|
|
|
> See also: `systemctl revert`.
|
|
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Overlay a unit file non-destructively:
|
|
|
|
|
|
|
|
|
|
`sudo systemctl edit {{unit_file}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Edit a unit file:
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
`sudo systemctl edit {{unit_file}} {{[-l|--full]}}`
|
|
|
|
|
|
|
|
|
|
- Create a new unit file:
|
|
|
|
|
|
|
|
|
|
`sudo systemctl edit {{unit_file}} {{[-lf|--full --force]}}`
|
|
|
|
|
|
|
|
|
|
- Overlay a user unit file:
|
|
|
|
|
|
|
|
|
|
`systemctl edit {{unit_file}} --user`
|