This question already has an answer here:

I have many custom service files that I control with systemctl and up until today I have been putting these .service files in /usr/lib/systemd/system/, however today I obtained a new program and it automatically created the .service file in a location I didn't think of - /etc/systemd/system/.

Is this where I should have been putting the service files I have created myself? Both directories appear to work, so ultimately I know it doesn't make a difference, but what does convention dictate? Is there a more correct location to have these custom service files?

marked as duplicate by filbranden, Jeff Schaller Jun 6 at 0:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The convention is that /usr/lib is for files installed by the system, and /etc is for local configuration.

Not the answer you're looking for? Browse other questions tagged or ask your own question.