Monday, September 25, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  119] [ 0]  / answers: 1 / hits: 283551  / 2 Years ago, sun, september 26, 2021, 5:58:12

I keep finding, while googling, that they're located at /usr/lib/systemd/system/ and /etc/systemd/system/. However, in my ubuntu, the first doesn't even exist, and the other has only a few services             
dbus-org.bluez.service display-manager.service
dbus-org.freedesktop.Avahi.service display-manager.service.wants
dbus-org.freedesktop.nm-dispatcher.service plexmediaserver.service syslog.service

Where are the others?

When I run systemctl list-units I see so many services but I don't know where to locate them. For example, where is my plexmediaserver.service? I need to know because that's where I want to put my other units.

More From » boot


The package-provided service files are all usually located in /lib/systemd/system. For example, search for .service in the package index.

From man systemd.unit:



The latter ones are for user sessions. IIRC Ubuntu 16.04 still uses upstart for user sessions, so those files are only applicable from after 16.04.

For a specific service, to see what systemd is reading, run systemctl status <service> or systemctl show <service>:

$ systemctl show ssh.service | grep Path
$ systemctl status ssh.service
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/ssh.service.d
Active: active (running) since Thu 2017-01-26 16:06:53 JST; 21h ago
Main PID: 948 (sshd)
CGroup: /system.slice/ssh.service
└─948 /usr/sbin/sshd -D

[#12311] Monday, September 27, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 215
Total Questions: 127
Total Answers: 146

Location: Denmark
Member since Tue, Jul 19, 2022
1 Year ago