The argument is basically that it does too much and as the motto of Unix was basically "make it do 1 thing and that very well", systemd goes against that idea.
You might think it is silly because what is the issue with it doing many things. Arguably, it harms customization and adaptability, as you can't run only 2/3 of systemd with 1/3 being replaced with that super specific optimisation for your specific use case. Additional, again arguably, it apparently makes it harder to make it secure as it has a bigger attack surface.
Then again, it doing all those things can lead to those parts working together better because it's the one project instead of a dozen different projects with every distro having a different mix.
Problem is, nobody's alternative solves all of the problems people wanted their init system to solve. sysvinit didn't solve booting/service supervision well, so it's hard to say it was really a UNIX philosophy solution, and it wasn't even part of the OG Unix system but came over a decade later in 1981 with AT&T's system iii (later included in system v, hence the name sysvinit). There's nothing sysvinit does well. The most popular services and distributions had simply thrown away so many hours of time and effort bashing their heads against sysvinit's limitations that they had managed to make them work, but that's different from the system overall working well.
Anyways, people don't like Poettering, but he made inroads with systemd in large part because he actively took notes on what people wanted, and then delivered. He's an unlikable prick, but he delivered a product it was hard for many projects to say no to. That's why project after project adopted it. It solved problems that needed solving. This counts for more than adherence to an archaic design philosophy from the 70's most people don't follow anyways and which the predecessor wasn't even a good exemplar of anyways.
You can in fact run 2/3 Systemd whatever that means. Systemd components are modular so you can run the base system by itself if you want to.
Additionally systemd just works. You really don't need to care about the details as running something like a web server or service is as simple as starting it. Dependencies are handled automatically.
More like it's bad because of architecturial decisions (integrated init system; system state managemt in the same package as init and supervision), creating lots of unneeded complexity, number of CVE's, how the developers behave (or don't), and that you can't have other init systems in the same repo without a fuckton of shims and wrappers.
In fairness reading this thread all I see is systemd good
Why: i find sysvinit start up scripts too complicated to read/modify so let's drop this gigantic mammoth that does a million other things on my lunux system so I don't gave to learn how to write a shell script.
I don't have much skin in the game and have been out of the loop for many years but don't find many of the arguments in favour of systemd very convincing
Poettering and Systemd are amazing and Linux would not be as good as it is today without them. Whether you like it or not, we can't have a fragmented ecosystem and expect people and companies to adopt it (see the 14 competing standards XKCD). Having one solid base that works the same on every client is like literally the base requirement for making a product for the said client. Systemd, flatpak, xdg-portals, pipewire and immutable distros all solve this.
Here's my hot take: I don't care what operating system most people use. If people are happy on Windows, let them stay on Windows. That's not my problem. When you say we need to make Linux less diverse and interesting to make number go up because more biggerer number more gooderer then suddenly that is my problem. You are trying to make my experience worse for the sake of something I do not care about.
There is nothing wrong with systemd. Most people on Linux are using it, and that's fine. Options are good too though. I specifically like Linux because it's NOT a bunch of homogeneous lowest common denominator sameyness. That's the very thing I don't want.
I'd like to propose a new rule for this community:
People criticizing systemd to the extent where they promote alternatives (regressions), have to provide proof that they have or are maintaining init scripts for at least ten services with satisfying the following conditions: said init scripts must 1.) be shown to reliably start up the services and 2.) not signal their dependencies to early and 3.) gracefully stop the services 99.9% of the time. People failing to satisfy these conditions are not allowed to voice their opinions on how arbitrary init systems are better than systemd. Violations of this rule will be punished by temporary bans and forcing the violators to fill the entire canvas of a blackboard with "'do one thing and do it well' is a unix principle, not a linux principle" in fine print.
More lines of semi-reliable init scripts have been written by package maintainers, than lines of systemd code by Poettering & Co, and that while achieving far less. The old init systems might have been simple, the hell of init scripts wasn't.
That might have been true a decade ago. I don't actually know. I do know that modern init scripts for modern alternatives to systemd are barely longer than systemd service scripts though. So that's kind of an insane take.
To me systemd is fine, I am not really emotional at init systems. But on the other hand Linux is about choice and systemd kills that in some way because it does so much more than just starting services. GNOME is unusable without systemd, which makes it a no choice if you go into another rabbit hole. It’s kinda weird how deeply systemd is integrated in Linux these days. What I really dislike is that the log is in binary format by default which makes it necessary to deal with another tool to read logs. But well software changes, so do tools. But honestly the devs acted like dick heads sometimes, so I think most of the antipathy comes from their behavior and well yes MS now kinda pushing systemd because poettering works for them. I have fear that MS forces the systemd devs to implement things you cannot simply opt out of because it is so tightly integrated. Maybe copilot for writing systemd unit files would be nice though :P
Systemd is very customizable and flexible. I also fine it is faster than anything else. You can also choose what systemd services to use and what not to use
well yes MS now kinda pushing systemd because poettering works for them. I have fear that MS forces the systemd devs to implement things you cannot simply opt out of because it is so tightly integrated.
That's a nonsense spin of things. There wasn't/isn't a need for Microsoft to push systemd, because it had been adopted by all major linux distributions before Poettering even made the switch. It's a straw that init system luddites clutch at.
Or dinit. dinit is awesome. s6 defeated me; an init system shouldn't be that complex.
systemd has a lot of nice features, esp. in the area of dependencies and triggers. But it infects everything it touches, is enormous, and is buggy.
Frankly, I'm waiting for the PipeWire successor to systemd. Like systemd, Pulseaudio was everywhere by the time enough people realized how bad it really was and someone wrote a well-designed, well-written replacement. ALSA has problems that Pulseaudio fixed, but with a badly written solution; then a good software developer came up with a good solution that solves the same problems but isn't just a giant hacky hot mess and now PA is slowly being replaced everywhere. Given that the same person, of questionable skill, who wrote PA also wrote systemd, I fully expect a better-designed solution to replace systemd.
S6 isn't it. dinit is close, but has some holes that need addressing before it could succeed systemd, and I think it won't be it; I think systemd's successor hasn't been written yet, but I have confidence it will be.
Kind of sad there are still people raging over systemd. When it flares up in discussions there is the usual debunked nonsense:
it only logs information to binary and this is somehow bad. Except it it can be configured to log to text as well and it uses binary so it can forward secure sign records to prevent tampering as well as offering database style query operations.
it's insecure because the repo has millions of lines of code. Except that they compile into hundreds of small binaries running with least privilege, and often replacing the task of far more dangerous processes (e.g. there is an NTP client in systemd which sets the time and nothing else).
various rants about the primary author
What is more bizarre is the nostalgia and hearkening back to sysvinit scripts when systemd didn't replace sysvinit! Systemd replaced upstart which replaced sysvinit. Because writing 100s of lines of script to stop/start/restart a process sucked - insecure, slow, didn't scale, didn't capture dependencies and everyone knew it. Upstart was the first attempt to solve the issue and was used in Debian / Ubuntu, Fedora / Red Hat, openSUSE and others until systemd came along.
Not really involved with Linux for the past 15 years so don't know the ins and outs of the systemd saga butyour debunking is not as convincing as you make it sound.
I do run a system at home that when all goes well I don't need to login to or do troubleshootingfor months. (Ie. Movies and shows download fine, homeassistant works). I stumbled upon systemd a while ago when I had to google how to fucking find and look at some logs on my Ubuntu system. Wtf have been a sysadmin professionally for years until a decade ago. Never seen something changing like that, but I digress as for your points.
Being able to query logs like a database sounds appealing dont take me wrong. But If I am interested I will install splunk, graylog or whatever kids use these days, I don't need a core component to make a major structural change (logging on Unix is expected to be in plain text, most tools on a Unix systems do some sort of manipulation of log files, and i expect to use cat, grep and tail to work on my logs). The fact that I can opt out is a minor consolation. Also if I want my logs not to be tampered with, I'll look into how to do that with dedicated tools and technology. On most systems that's not a concern, why would you even consider that something appealing?
As for sysvinit scripts pain, I hear you buy a) I am pretty sure most script I have written/modified were tens of lines of code, not hundreds, hardly an impossible task to deal with. And b) that's not something your average user needs to do every day (or decade). Most likely a sysvinit script would be implemented once in the lifetime of a particular project by the developer themselves, or by a package maintainer.
If the solution to such a big problem is to have millions of lines of compiled code (that's news to me, I'll trust you on that number) it makes me wonder even more.
Are you sure all the counterarguments are really just bizarre nostalgia and easily debunked? I haven't even read much about it and even when people like you try to sell how good systemd is, it looks to me like the solution we didn't ask for a problem we didn't have.
You can still log to text if you want by configuration (e.g. forward stuff to syslog) and you can use any tools you like to read those files you want. So if you like text logs you can get them. You can even invoke journalctl to output logs on an ad hoc / scheduled basis in a variety of text formats and delimited fields.
Binary allows structured logging (i.e. each log message is comprised of fields in a record), indexing and searching options that makes searches & queries faster. Just like in a database. e.g. if you want to search by date range, or a particular user then it's easy and fast.
Binary also allows the log to be signed & immutable to prevent tampering, allow auditing, intrusion detection etc.. e.g. if someone broke into a system they could not delete records without it being obvious.
So people object to systemd writing binary logs and yet they can get text, or throw it into splunk or do whatever they like. The purpose of the binary is make security, auditing and forensics better than it is for text.
As for scripts, the point I'm making is systemd didn't supplant sysvinit, it supplanted upstart. Upstart recognized that writing massive scripts to start/stop/restart a process was stupid and chose an event driven model for running stuff in a more declarative way. Basically upstart used a job system that was triggered by an event, e.g. the runlevel changes, so execute a job that might be to kick off a process. Systemd chose a dependency based model for starting stuff. It seems like dists preferred the latter and moved over to it. Solaris has smf which serves a similar purpose as systemd.
So systemd is declarative - you describe a unit in a .service file - the process to start, the user id to run it with, what other units it depends on etc. and allow the system to figure out how to launch it and take care of other issues. It means stuff happens in the right order and in parallel if it can be. It's fairly simple to write a unit file as opposed to a script. But if you needed to invoke a script you could do that too - write a unit file that invokes the script. You could even take a pre-existing init script and write a .service file that kicks it off.
As somebody who started my *nix journey on Unix System V, the OS that sysvinit came from, I think the grandparents comment is spot on.
Also, upstart could have been good, but it's actually pretty great to see the majority of the ecosystem adopt a single new solution. We wouldn't want the init landscape to be like the X vs Wayland and WM landscape.
You know, it's funny. I don't actually have much of a strong opinion on The Unix Way or Lennart Poettering, and I'm not super fond of Red Hat, but it's not like I'm going to avoid everything they're involved in the maintenance of and still use Linux.
I do like alternatives though, so I've been trying out OpenRC recently, and I gotta say I really like it. Of course there's a little bit of a learning curve, but honestly it's just simple and fast and stays out of the way, and it's nice to just open logs in any text editor I like. Systemd can do all kinds of crazy things, and if you need any of them then there's no reason not to use it, but I don't, and it's just kinda pleasant to have something nice and straightforward that I actually kinda understand instead.
It's a mistake indeed. And there's a very logical explanation as to why I made that mistake. The reason's simple, really. Obvious even. So much so that I won't bother explaining.
It's not inherently bad, it "fails" the Unix Philosophy of "Do one thing and do it well" but since Linux's kernel is:
Unix-like, not Unix
Fails this philosophy, as it does more than one thing but does all of it pretty well
systemd is just a bundle of tools that do one thing and do it well under one package, like Linux's kernel
It used to be a mess, but that's solved. The biggest reason to avoid systemd is mainly user preference, not anything malicious. 90% of current distros use systemd as its easier for the maintainers and package programmers to build for the general than each package and each distro having their own methods of how to do an init system and other tasks.
How Debian and Arch and Gentoo and Slackware and other big distros worked was different, and the maintainers of those packages had to know "Debian's way" and not a general way that most places accept. Systemd actually solved the Too Many Standards! issue.
I've never really seen a big argument against systemd, but maybe I've just not heard it.
It also didn't help that Poettering isn't particularly popular on a personal level. I think there would have been a lot less drama if he had better people skills.
Do you mean the past tense of the verb solve or the systemd service that solves mathematical equations? Because solveds code is still a mess. It used to too, but it still is.
SystemD is not really bad. Like 90% distros use it, and for good reasons. Some people just pointlessly hate it on it, same way some people like to hate on Wayland too.
I believe partly because it takes over so many responsibilities that it becomes a requirement for things that don't need to require it. Plus it diverged from the Linux principle of do only one thing.
I am fine with systemd. It works. It is more complicated than init.d
Before you copied some random file you edited and put it in init.d and it worked. Now you copy some systemd services file into systemd and run enable and start and it doesn't work because you don't know what you are doing.
I didn't know what I was doing in init.d too but now I have to learn systemd services. Once you know a bit it will work then (probably)
I disagree. Before I had to copy and edit a huge-ass script (100+ lines) in init.d where 80% of it was concerned with PID files. I just want to start a process on boot, why is it so hard?
Now I can look at the documentation and write a simple unit file myself. It's like 4 lines.
init.d wasn't really what you'd call an "init" "system." It was shell + conventions about how to write shell scripts to manage each service. It effectively offloaded most of the work people wanted an init system/service supervisor to do onto developers that just needed to ship a system service. To be honest, it was insane. Templates/patterns/best practices emerged, but at the end of the day, init.d was just shell, and it caused tons of problems.
The extra complexity of systemd is in exchange for dependency management, service supervision, tons of things that are important/desirable for sysadmins/developers today, but are all far outside the scope of init. I'd much rather cope with the extra complexity of systemd in exchange for being able to write an actual service definition file.
Before you copied some random file you edited and put it in init.d and it worked.
Before you copied some random file you edited and put it in init.d and it appeared to be working but then failed in random ways the first time you restarted, the first time you rebooted, the first time you restarted it via sudo instead of directly as root since some environment variable differed,...
So really it only appeared to be working in my experience because you had no real way to check.
I mean I've briefly tried some of the modern distros that go without systemd recently, and honestly they just felt like I went back in time except they weren't even the same as then so I had no idea what I was doing without reading documentation that is imo much worse than the arch wiki.
And as a bonus fuck man pages as I can't in a pleasant way put them into my 1000s of categorized browser tabs for research and topic switching while being able to return without starting over.
TL;DR init system, services, sockets, slices, logs, boots, VM's, containers... and that's fantastic, for monolithic systems. journalctl go brrrr
Strap in, folks. Old timer with a gavel to slam.
When systemd is unfolded in full, people are sort of apt when they jokingly say "-Linux, or what I'd like to call gnu/systemd/Linux". Some scream at the top of their lungs, yearning back to rc.0 days, "when everything was much simpler"... this is where the gavel comes down. There are so many improvements they are hard to list and if you asked me if I could go back, only with modern software, I would say nay... and here's why:
Running services is a whole mess more than just running background apps, and it's intrinsically intertwined with what is known as the init system - no matter what some people may think. Init is the process of initializing (or bootstrapping) an operating system, and services are background services, but both are about managing the processes within the Linux stack - or the thread. Some say that systemd is doing more than it should, but systemd is not "crossing streams" when both init processes and services need to be managed in concert depending upon the way a system inits - because there's more than one way to init.
systemd manages init through scopes, slices and services, which combined create the hierarchy of processes used to bootstrap a system, get things up and running, with their relative permissions, in a given state, to facilitate a running and functioning system. Socket units handle socket files or destinations, and timer units handle event driven processes.
It all comes together into a dependency chain that defines your running system, which is testable and manageable from a set of tools. systemctl is used to manage a running system, and I think it does a great job of it. Imagine fail testing a bunch of non-standardised, random rc bash script files that aren't distro agnostic, along with whatever daemon runner you were using. It was a mess, and systemd sought to fix that - which imho it has. We view a booted Linux system and it's process tree much differently through the systemd lens, which gives us a newfound focus that helps us better manage a running system.
Also, logs are binary now... you're all so spoiled and you don't even know it. Do you remember 20GB txt files you absolutely had to open? Pepperidge farm remembers. Which brings us journalctl, which is just so good. It's the swizz army knife of Linux logs. You can point it at anything. Specify -k for dmesg, a service using --unit, point to a binary in /usr/bin, select previous boot with -b -1, -f for follow, -e take me to the end of a log. If you haven't learned how to use this tool, you are running blind. It whips every dang logging system out there. Going from systemd to windows events feels like going from a soft mattress to the inside of an iron maiden.
systemd-boot is blazing fast. Don't get me wrong, Grub2 is still fantastic as well (Apple seems to think so at least), but considering ease of us - as I often do - I'm inclined to prefer systemd-boot because of bootctl, because like journalctl, it's a wonderful piece of kit for managing, analyzing and failtesting boot images, provides UEFI functionality and being a sort of one-stop shop for the boot process.
Now we we're seeing systemd managing VM's (machinectl) and containers (containerctl), and honestly I'm all for it. Make my life easier. Please. Standardise that mess. And since it is standard, everyone supplies systemd units and because of the nature of systemd and it's designs, it's all fail-safed to hell and back. This is good. We want this. At least on the desktop, workstation, even some servers. For containers, embedded, not so much, as they aren't monolithic systems. That being said, NixOS has proven that systemd isn't a barrier to entry for new system paradigms either, so I feel those fears were unfounded.
You get the theme here. Systemd is a system management suite, and not just a service runner or init system. It seems to grow and grow out of proportion, but at the end of the day, it's about getting the system(s) and software up and running, as well as managing those processes and figuring out where problems lie. That's what systemd does. It's become part and parcel of a fully monolithic Linux stack, and in my opinion it's a great project that makes our lives much easier.
To me systemd is zen. It's the cup of tea Linux always needed, and I'm not ashamed to say so.
Having to occasionally go back to OpenRC or Upstart systems is jarring. Systemd just does so much and does it so much better. Poettering seems like a bit of a chode but he genuinely made an incredible project. I also think that when people say systemd isn't Unix-like, they forget that systemd isn't monolithic and it's possible to use some components of it but not others. The core is all based on a standardized way to start and manage processes and services, be it for boot or usage.
@taanegl@DmMacniel omg i was so prepared to hear a anti-lennart-pottering rant about sysv init scripts
thanks for what instead turned out to be a very thoughtful and educational text which i will now send to all these sysv ppl
What are you talking about? The goldwing has been consistently hailed as one of the best touring motorcycle for almost 40 years. Every long distance rider I've spoken to says the goldwing is their favorite bike for cross country rides, and the ones who have sold theirs for a BMW or Harley touring bike have expressed regrets about changing.
Just because something has a lot of features, doesn't mean it's bad.
Systemd really is shitty, and Poettering is a serious asshole; but that ship has sailed. It's time to accept that computers only get worse, and move on.
I'm sad that you have to throw out all the init scripts you've written in 30 years.
Maybe stick with Slackware? I'm pretty sure you'll fit in well there.
I never said init scripts (and more importantly, the init process) were the right answer. It doesn't change the fact that systemd has some bad fundamental design and implementation decisions; and that any attempt to address them was met by Poettering saying essentially "this is the way I designed it, and therefore it's right. You're wrong." He has no regards for standards, compatibility, or consistency.
It wasn't even the first replacement for process management out there. Sun had SMF which was effective but flawed; and systemd duplicated almost every one of its flaws.
In other words, saying that init had to be replaced didn't necessarily mean systemd; but that's the world we have now.
You missed the point where I said "...and move on."
The fact that I dislike it doesn't change the fact that it's prevalent, and so I use systemd every day.
It's the same with any technology I need. Ansible is a mostly awful language, but I need it to do my job, so I buckle down and use it. Git is...well actually git is pretty awesome.
A decade (or two?) ago, perl was the language of choice for complex admin tasks, despite being a nightmare to maintain. Now we have mostly moved to python and ruby, which are generally much better.
My point is that just because a standard (process, tool, etc.) is flawed, we don't refuse to use it; and conversely, just because we use a tool doesn't make it immune to valid criticism.
Is that really a valid counter argument though? We could say most computer users use windows, doesn't necessarily make it a better os choice.
Yes the community has decided, fair enough, op has already said let's move on.
People that have been around for a bit longer than most here and have seen and used Linux from the very beginning are still entitled to an opinion.