0

I have a need to experiment with systemd config, where I have some locally stored (somewhere inside $HOME) *.service files. But I do not want to create some kind of VM or container only for that purpose of experimenting/testing.

Is it possible somehow to point systemctl to that custom directory, eliminating the need to copy that test service config file into one of the default directories (/etc/systemd, /usr/lib/systemd etc.)?

Student4K
  • 119
  • 2
  • There is one more directory. Perhaps this option will suit you?: https://unix.stackexchange.com/a/606479/381427 – nezabudka Oct 21 '20 at 12:11

1 Answers1

2

The user instance of systemd handles service files from ~/.config/systemd/user/

Simply add --user to all systemctl invocations e. g. systemctl --user status mytest for checking the state of the service defined in ~/.config/systemd/user/mytest.service

god
  • 461