327
submitted 1 year ago by TCB13@lemmy.world to c/linux@lemmy.ml

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
[-] marmarama@lemmy.world 59 points 1 year ago

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?

[-] TCB13@lemmy.world 22 points 1 year ago

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.

[-] astraeus@programming.dev 7 points 1 year ago

I find systemctl to do a much better job than any alternative that comes stock with distros. I’m looking at you service

[-] SpaceCadet@sopuli.xyz 10 points 1 year ago

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.

load more comments (7 replies)
load more comments (1 replies)
[-] ozymandias117@lemmy.world 47 points 1 year ago

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

[-] TCB13@lemmy.world 16 points 1 year ago

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.

[-] ozymandias117@lemmy.world 8 points 1 year ago

Sure, but if you’re trying to convince the groups that hates systemd, a preamble of “these don’t run in PID 1 and are just extra features you might find useful” could help

load more comments (1 replies)
load more comments (1 replies)
[-] jimakososx@lemmy.ml 37 points 1 year 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.

load more comments (4 replies)
[-] mrvictory1@lemmy.world 29 points 1 year 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.world 5 points 1 year ago* (last edited 1 year 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.

load more comments (1 replies)
[-] Quazatron@lemmy.world 18 points 1 year ago

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.

[-] TCB13@lemmy.world 5 points 1 year ago

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

[-] t0m5k1@lemmy.world 5 points 1 year ago

I stopped using resolved as it tends to ignore what I tell it to do and still grab DNS from the router which I don't want and can't disable on the proprietary router.

openresolv/Resolveconf was never broken in the first place so I'm not sure what systemd was trying to fix with this.

load more comments (2 replies)
load more comments (1 replies)
[-] nicman24@kbin.social 12 points 1 year ago

systemd-nspawn is basically chroot but better

[-] TCB13@lemmy.world 5 points 1 year ago

Way, way better. Nowadays its more "basically" LXC. :P

load more comments
view more: next ›
this post was submitted on 10 Aug 2023
327 points (96.6% liked)

Linux

48721 readers
2365 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS