HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl edit — Edit systemd unit files. See also: `systemctl revert`. More information: <https://www.freedesktop.or

Submitted by: @import:tldr-pages··
0
Viewed 0 times
systemdunitsystemctl editcommandfilesclieditsee
linux

Problem

How to use the systemctl edit command: Edit systemd unit files. See also: systemctl revert. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.

Solution

systemctl edit — Edit systemd unit files. See also: systemctl revert. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.

Overlay a unit file non-destructively:
sudo systemctl edit {{unit_file}}


Edit a unit file:
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

Code Snippets

Overlay a unit file non-destructively

sudo systemctl edit {{unit_file}}

Edit a unit file

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

Context

tldr-pages: linux/systemctl edit

Revisions (0)

No revisions yet.