After a few conversations with people on Lemmy and other places it became clear to me that most aren't aware of what it can do and how much more robust it is compared to the usual "jankiness" we're used to.

In this article I highlight less known features and give out a few practice examples on how to leverage Systemd to remove tons of redundant packages and processes.

And yes, Systemd does containers. :)

top 50 comments

sorted by: hot top controversial new old
[–] 59 points 3 years ago (12 children)

Do we have to bring this up again? It's just boring.

systemd is here and it isn't going anywhere soon. It's an improvement over SysV, but the core init system is arguably less well-designed than some of the other options that were on the table 10 years ago when its adoption started. The systemd userspace ecosystem has significantly stifled development of alternatives that provide equivalent functionality, which has led to less experimentation and innovation in those areas. In many cases those systemd add-on services provide less functionality than what they have replaced, but are adopted simply because they are part of the systemd ecosystem. The core unit file format is verbose and somewhat awkward, and the *ctl utilities are messy and sometimes unfriendly.

Like most Red Hat-originated software written in the last 15 years, it valiantly attempts to solve real problems with Linux, and mostly achieves that, but there are enough corner cases and short-sighted design decisions that it ends up being mediocre and somewhat annoying.

Personally I hope that someone comes along and takes the lessons learned and rewrites it, much like Pulseaudio has been replaced by Pipewire. Perhaps if someone decides it needs rewriting in Rust?

  • source
  • hideshow 12 child comments
  • [–] [S] 22 points 3 years ago (2 children)

    The core unit file format is verbose and somewhat awkward, and the *ctl utilities are messy and sometimes unfriendly.

    While I agree with the rest I don't particularly believe in this. The unit format is well structured and solves many pitfalls of previous approaches, it also supports configuring a myriad of different things from mounts to sockets and the network in a nice way.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 3 years ago (7 children)

    Thanks for summarizing my feelings on systemd in a less inflammatory way than if I had written it myself.

    I've found that most distributions have implemented it properly and for the most part it works quite well and stays out of my way, it's only when for some reason you have to dive into the minutiae of a unit file and getting into all the dependencies and stuff that it gets annoying quickly.

  • source
  • parent
  • hideshow 7 child comments
  • load more comments (7 replies)
  • load more comments (1 reply)
    [–] 47 points 3 years ago (4 children)

    One of the big complaints of systemd detractors I read is that it’s “monolithic” and “taking over everything” and this “shouldn’t all be part of init”

    You might want to point out that all the features outside of systemd-as-init are optional and can be replaced or ignored if you don’t want them. They also don’t run as PID 1

    You do have to use systemd-journald, but you can also just forward it to syslog if you want

  • source
  • hideshow 4 child comments
  • [–] [S] 16 points 3 years ago (3 children)

    all the features outside of systemd-as-init are optional and can be replaced or ignored if you don’t want them

    Yes, but the point of the article was kind of the opposite - simply try all the systemd tools and components and see how much better things can get.

  • source
  • parent
  • hideshow 3 child comments
  • load more comments (1 reply)
  • [–] 37 points 3 years ago (4 children)

    systemd brings much functionality. It can't follow unix philosophy because unix is 50 years old. the whole community drama about this systemd VS sysV VS OpenRC VS whatever comes up, is funny. There are distros that are systemd-free if you wish so much to avoid it.

  • source
  • hideshow 4 child comments
  • load more comments (4 replies)
    [–] 29 points 3 years ago (2 children)

    Finally a systemd praise post after so many hateful remarks. I knew systemd could do dns resolving but just learned it could handle the entire network stack and replace NetworkManager. I have a question: How can services such as Apache adapt to both NM and systemd at the same time? NM and systemd have different wait-online services. You can also add systemd-analyze for boot time analysis to the list.

  • source
  • hideshow 2 child comments
  • [–] [S] 5 points 3 years ago*

    How can services such as Apache adapt to both NM and systemd at the same time? NM and systemd have different wait-online services

    If you look at the systemd unit for Apache you'll just find After=network.target - it doesn't wait-online at all. Apache doesn't really care if you're using NM or systemd-networkd, it simply queries the system (like the ip command does) to know what's going on with the network. It was designed as recommended for moderns programs: it is aware that your network might change and listens for the appropriate signals and takes care of the binds dynamically.

  • source
  • parent
  • load more comments (1 reply)
    [+] 23 points 3 years ago* (last edited 2 years ago) (6 children)
  • [–] [S] 9 points 3 years ago (4 children)

    imagine some kind of GUI like Windows has for system services

    The problem is that systemd has so many possible options and ways to do things that you'll either end up with something that "lags behind the actual systemd resources" or a glorified text editor specially made to write systemd units.

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (1 reply)
    [–] 18 points 3 years ago (5 children)

    Very interesting article with lots of links that I'm sure to revisit often. I use Linux daily and was not aware of all the possibilities that systemd has to offer.

    Some of the cruft I use nowadays to manage Linux machines can be optimized by simply moving over to the systemd equivalent. Of particular interest to me are: triggers, timers, file monitoring, and ntp.

  • source
  • hideshow 5 child comments
  • [–] [S] 5 points 3 years ago (4 children)

    Thank you. NTP and DNS are the easiest to get into. Simply enable the services and move on.

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (1 reply)
  • [–] 12 points 3 years ago (1 child)

    systemd-nspawn is basically chroot but better

  • source
  • hideshow 1 child comment
  • [–] 4 points 3 years ago (2 children)

    Having choice is the best part of Linux, but Systemd is something so ubiquitous to Linux that it might as well be called Systemd/Linux instead of GNU/Linux.

    When you think of it like that, it feels much less like a bloated behemoth that needs to be de-monopolised and more like an integral piece of the puzzle that is turning the Linux kernel into an functional operating system.

  • source
  • hideshow 2 child comments
  • load more comments (2 replies)
    load more comments
    view more: next ›