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. :)

  • jimakososx@lemmy.ml
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    2 years ago

    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.

      • rocketeer8015@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        This was refuted long ago. Systemd isn’t a single binary file doing everything, it’s a project that has many different binaries doing many different things. The only difference is that they are developed under one project to ensure they integrate well with each other. What your doing is like complaining that glibc tries to do everything, I mean it does open, read, write, malloc, printf, getaddrinfo, dlopen, pthread_create, crypt, login, exit and more… Xorg would be another example of a project that does many things instead of one very well.

  • merthyr1831@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    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.

  • nomadjoanne@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    Very cool. I had no idea systemd sort of has a cron replacement. While in I don’t think I’ll switch from cron in the immediate future, it’s really good to know.

    • TCB13@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      Systemd timers are way, way better than cron. Because can audit them, view when they last run, next expected run, can be set to persist with reboot or not, aggregate logs under journalctl, can do amazing things such as “x minutes after boot”, can be configured not to run again until the last run is complete etc… https://opensource.com/article/20/7/systemd-timers

      • nomadjoanne@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        2 years ago

        Fully agreed. But I know how to use cron, I have a life to live, and this switch is way down the priority list.

        But it is something I’d like to find the time to do at some point.

        • TCB13@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 years ago

          Well if it makes you more comfortable let me tell you that the format of OnCalendar is the same, or very close. I bet that just by looking at the following you know what is does!

          [Unit]
          Description=Logs some system statistics to the systemd journal
          Requires=myMonitor.service
          
          [Timer]
          Unit=myMonitor.service
          OnCalendar=*-*-* *:*:00
          
          [Install]
          WantedBy=timers.target
          
  • Drito@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 years ago

    And yes, Systemd does containers. :)

    Are systemd duplicates such as containers and systemd-boot are better than the existing ?

  • mrvictory1@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    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.

    • TCB13@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      2 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.

  • bitwolf@lemmy.one
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 years ago

    Pretty sure that’s how the Steam Deck runs also. At least every custom OS I’ve seen for it is just a ContainerFile and systemd-boot

  • Rune@lemmy.ml
    link
    fedilink
    arrow-up
    3
    arrow-down
    3
    ·
    2 years ago

    Systemd together with NetworkManager are two pieces of software I really dislike. They go against the very Unix philosophy. I like being able to piece all the bricks together on my own, not having monolithic pieces of software that try to do everything.