this post was submitted on 29 Aug 2026
40 points (100.0% liked)
Linux
67365 readers
541 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 7 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
systemctl list-unit-files --state=enabledto check everything enabled that you might want to disableas for running as root, AFAIK all systemd services run as root, unless they're defined at the user-level; but IME setting services at the user level usually means a more involved setup to make sure PATH and env vars are correct.
Well behaved services would usually run on a special user that exists just for that service. Either systemd would run the service using the specified user or the service would start as root to do privileged operations like opening specific ports and then run subprocesses as the more limited user.
Systemd can also create a temporary user, with
DynamicUser. But I so very rarely see that being used.You can also add the
CAP_NET_BIND_SERVICEcapability to do this without root.IMO, there's usually no reason to use root in a systemd service, it's just ignorant developers.