Hacker News new | ask | show | jobs
by inetknght 1968 days ago
You have to know that you're looking for `systemd.service` in the first place.

If you search for `man service` you get linked to SysV init scripts [0] and are led astray if you don't know that sysv init scripts aren't systemd.

If you search for `man systemd` you get linked to a huge man page [1] which isn't approachable to a novice. There isn't an `EXAMPLE` section like there are on other man pages and searching for `example` doesn't reveal any commands to run. It doesn't describe where you can find an example service (unless you magically know that a "system unit" is a service and there's even a gotcha to that: it doesn't have a `files` section to describe where files are at (contrast with `man ssh_config` or `man nginx`) and it is absolutely not clear that the directory is hidden behind an obscure `pkg-config` invokation. Good luck discovering other services you can learn from by reading their service files!

If you managed to do `man systemctl` [2] you reach equally poor documentation. Again, no `files` section and this time not even a mention of `pkg-config`. There's a ton of mentions of environment variables (why does the _system_ need environment variables???). It describes how to "list" units but doesn't describe that it _won't_ list your user units (or, won't list the system units if you do --user). It doesn't describe how to _create_ a unit. It doesn't clearly walk you through the steps (again, there are no examples) so it's up to you to figure it out and hope you don't fuck up your system.

If you search for "just" `systemd`, you arrive at systemd.io [3]. Again, this site is not approachable to a novice! There's just lots and lots of reading. A _lot_ of reading. There's a few "examples" scattered everywhere in the form of an example command to run and a description of what it does. But _nowhere_ is there a single example with everything tied together into a single Hello World style solution.

[0] https://linux.die.net/man/8/service

[1] https://man7.org/linux/man-pages/man1/systemd.1.html

[2] https://man7.org/linux/man-pages/man1/systemctl.1.html

[3] https://systemd.io/

1 comments

>You have to know that you're looking for `systemd.service` in the first place.

Yeah, because that's the thing you want help with.

No shit `man service` and `man systemd` aren't going to give you help for systemd services that easily.

Also, apparently you assume the user is simultaneously stupid enough to not put "systemd" and "service" in the same search query, but is meant to know to visit `https://systemd.software/service` even though it too contains both those words.

> Yeah, because that's the thing you want help with.

No it isn't. I, as a power user and only as a novice system administrator, want to "run a program at startup".

It's not clear to me that it's `systemd` that manages that. It's not clear to me that it's specifically `systemd.service` that I need to find help with.

> No shit `man service` and `man systemd` aren't going to give you help for systemd services that easily.

But... why???

> Also, apparently you assume the user is simultaneously stupid enough to not put "systemd" and "service" in the same search query

Yes, I do assume that because it describes me. I'm sorry you think I'm stupid though. Get off your high horse and start thinking of people with different experiences than yours.

> but is meant to know to visit `https://systemd.software/service` even though it too contains both those words.

Searching Google for `systemd service` puts a link to freedesktop.org with a very un-memorable URL. I didn't even understand that "freedesktop.org" is the authoritive site until a few weeks into learning systemd. I definitely won't remember to type in "freedesktop.org/software/" before trying to find systemd documentation. And I don't want to have to use Google as a relay every time I want to read the documentation for systemd.

So I made a site that does it for me.