Given the CLI tool
systemctl edit can be used to edit existing systemd units such as services, timers, sockets, devices, mounts, automounts, targets, swap, path, slice, scope or nspawn files and you have another subcommand that can delete/reset systemd units can I also create a new systemctl file like this?
Most guides online tell you to use some custom text editor and place the file somewhere (where you first need to find the correct systemd directory, yet again…).
Also, you need to reload the daemon if you copy the files manually via
As a sysadmin I may however just quickly create a new unit in the default location, just as
systemctl edit would do for editing/overriding an existing entry.
I just like how it pops me directly into my favorite CLI text editor (nano or so) and I can edit my content right away.
systemctl add and
systemctl create, but no one of these two commands exists.
I did not find that information on the net nor any Stackexchange answer here…