Best resources for learning systemd?
from rutrum@lm.paradisus.day to linux@lemmy.ml on 03 Nov 21:46
https://lm.paradisus.day/post/342810

I feel like Im dancing around perhaps the most fundamental piece of my operating system everytime I run and install software. Starting services with systemctl and checking logs with journalctl is the extent of my knowledge.

Do you know of good resources or tutorials for learning how systemd works and how to use it to run software on my desktop and servers? Thanks.

#linux

threaded - newest

TCB13@lemmy.world on 03 Nov 22:07 next collapse

Systemd does a lot of stuff I guess it is easier to just lean based on what comes up / you need. There isn’t a single path.

wesker@lemmy.sdf.org on 03 Nov 22:38 next collapse

The best crash course I received was when I needed to translate my startup scripts into systemd services. The hands-on learning was priceless.

thingsiplay@beehaw.org on 03 Nov 23:53 collapse

I always recommend people learning by doing. But playing around with system tools to see and learn how it works is a bit risky. However in a virtual machine this is probably a good idea to see how things work.

seaQueue@lemmy.world on 03 Nov 22:40 next collapse

Write a couple of your own toy services as practice. Write a one-shot that fires at a particular time during boot, a normal service that would run a daemon and a mount service that fires after its dependencies are loaded (like, say, a bind mount that sets up a directory under /run/foo after the backing filesystem is mounted - I do this to make fast ext4 storage available in some parts of the VFS tree while using a btrfs filesystem for everything else.) You can also write file watcher services that fire after changes to a file or directory, I use one of those to mirror /boot/ to /.boot/ on another filesystem so it’s captured by my system snapshots.

I’d start by reading the docs so you have some ideas about what services can do, then you’ll find uses that you wouldn’t have thought of before.

thingsiplay@beehaw.org on 03 Nov 23:52 next collapse

The official website has ton of documentation and external links: systemd.io

And here some tutorials:

JustMarkov@lemmy.ml on 04 Nov 03:57 next collapse

nosystemd.org

Sorry, I couldn’t resist. /j, obviously.

0x0@programming.dev on 04 Nov 10:17 next collapse

Can’t help you, i avoid it like the plague.

msage@programming.dev on 04 Nov 14:35 next collapse

Gentoo OpenRC gang rise up!

Cornelius@lemmy.ml on 04 Nov 17:55 collapse

“I don’t use systems btw” 🤓☝️

michael@lemmy.michaelsasser.org on 04 Nov 11:01 next collapse

The man pages.

cy_narrator@discuss.tchncs.de on 04 Nov 12:55 next collapse

Next up: Learn how to create .service file, you may be able to use it from the template provided.

Then learn about target and unit

Find these on Youtube

caseyweederman@lemmy.ca on 04 Nov 13:26 collapse

Then .timer. Then .mount. Then .automount. Then .socket.

cy_narrator@discuss.tchncs.de on 04 Nov 15:27 next collapse

It seems even I have many many many things to learn still

caseyweederman@lemmy.ca on 04 Nov 17:38 collapse

Then .device and .boot and .home and .gov and .co.uk

InnerScientist@lemmy.world on 05 Nov 08:11 collapse

see systemd.unit(5), systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5), systemd.slice(5), systemd.scope(5) systemd.link(5), systemd.netdev(5), systemd.network(5) and honorable mentions podman-systemd.unit .container, .volume, .network(…again), .kube, .image, .build and .pod

astra1701@lemm.ee on 05 Nov 02:09 collapse

The arch wiki is always a good place to check for these sorts of things, whether or not you use arch btw.