this post was submitted on 28 Aug 2023
69 points (82.9% liked)

Linux

48375 readers
1587 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
 

I have seen so many times that systemd is insecure, bloated, etc. So i wonder ¿does it worth to switch to another init system?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 98 points 1 year ago

I mean, is systemd giving YOU problems? If not, don’t switch just because other people complain about it

[–] [email protected] 48 points 1 year ago (1 children)

Even you asking this question means you should not. Systemd is perfectly fine for most people and the people that dislike it have their very specific reasons. Just use what your distro gives you, you shouldn't have to care about these things.

[–] [email protected] 19 points 1 year ago (1 children)

Just use what your distro gives you, you shouldn’t have to care about these things.

To expand on this: OP, if you want to try a different init, you're most likely better off switching the whole distro to one using that init. Unless of course your current distro explicitly supports many different init systems (like Gentoo). Don't try to replace it by hand in a distro that expects to run on systemd, it's a recipe for disaster.

load more comments (1 replies)
[–] [email protected] 41 points 1 year ago (3 children)

Switch to sysvinit and you'll understand the benefit of systemd

[–] LeFantome 2 points 1 year ago (1 children)

This is a bit of a strawman. SysVinit is hardly the only alternative:

antiX: sysvinit and runit

Artix: openrc, runit, s6, and dinit

Chimera: dinit

Devuan: sysvinit (default), openrc, runit, sinit

Dragora: sysvinit + perp

Gentoo: openrc, systemd

Guix: shepherd

Hyperbola: openrc and runit

KNOPPIX: knoppix-autoconfig

MX Linux: sysvinit (default), systemd

Obarun: s6 supervision suite

Parabola: openrc, sysvinit, s6, systemd (default)

PCLinuxOS: sysvinit

Slackware: sysvinit

Stali: sinit

Void Linux: runit, openrc

load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 34 points 1 year ago (1 children)

just another one of the holy wars within Linux – for the average user, it’s not going to make any difference – most of the mainstream distros switched over a LONG time ago so if you want to avoid systemd, you have to do a little hunting (ex. Devuan, Void, Gentoo, etc.)

[–] [email protected] 12 points 1 year ago (2 children)

so, it's all just a "Playstation VS Xbox" kind of thing

[–] [email protected] 24 points 1 year ago (3 children)

It used to be that everything in Linux was a file, ideally a text file, so if you could find the right file you could access or change what you wanted. Systemd is a big program that manages a bunch of stuff and creates unique commands within its programs for doing so, which moves away from that principle and turns system management into what feels a bit more microsofty (like the registry editor program vs editing config files, etc) and a lot of people don't like that. But to its credit, it does solve a few problems with cobbling together a modern system that doesn't suck.

[–] [email protected] 19 points 1 year ago

Actually it doesn't really move away that much from the "everything is a file" principle. For example a "service" is a file describing how to properly start a particular service and if you enable a service, then a symlink is created to your service file, ....

[–] [email protected] 11 points 1 year ago

As a Windows app developer, I wish Windows service management, boot control, and logging were more like that of systemd. What we have is so much more janky and Sisyphean to work with.

[–] [email protected] 4 points 1 year ago (2 children)

It used to be that everything in Linux was a file, ideally a text file

Yes? The entire Systemd configuration is done with files. With a very well defined structure called units that you can use to configure, boot, service startup, networking, containers, mount stuff, open sockets.... that's exactly the point Systemd provides a cohesive configuration file format for a system.

load more comments (2 replies)
[–] [email protected] 9 points 1 year ago

Yes and no. Let me start by saying I use systemd and have never seen any of this as a problem big enough for me to switch.

The Unix philosophy is that a program should do one thing and do it well, the old init.d system did exactly that, but systemd does more than just start programs, for example there's the systemd-logind service which is used to authenticate users. Why is this a problem? Because some people don't want to use systemd, therefore they don't have logind, so if something were to depend on that, like GNOME's GDM did for a while, it would be impossible to use it without systemd. So in a way people complain about programs becoming dependant on systemd, and systemd grabbing more and more responsibilities to the point where it would become an integral part of Linux, it's not that systemd is a problem now, is that it has the potential to become so ingrained to everything that it becomes impossible to remove. But in the meantime systemd does provide some advantages, including parallelism which makes the computer boot faster.

Should you switch? Not really, this is more a philosophical debate on what Linux is and should be, I agree with all of the philosophical points and don't think programs should depend on systemd, but I don't think that's directly systemd's fault.

[–] [email protected] 30 points 1 year ago* (last edited 1 year ago)

Keep systemd. People can cry all they like but it's the best init system we have right now. Unless you want to start building a better one, i guess.

[–] KindaABigDyl 29 points 1 year ago* (last edited 1 year ago) (1 children)

Systemd is a large piece of software. There are ways to make it smaller and disable various modules for it, but usually by default it's very heavy.

With a traditional init system, it's just an init system, and you'll use other other programs to do the other things. This basically means a chain of interconnected bash scripts. Perhaps you'll run into some integration issues. Probably not though. It'll be mostly the same.

There is no real advantage to this from a user perspective beyond a philosophical one. Systemd works quite well at doing the things it tries to do, but it's the Unix philosophy to "do one thing and do it well," and some people care very deeply that systemd does not follow their interpretation of that philosophy, and that's certainly a fair reason to not use it.

However, if you're not having problems with using systemd, I'd say don't bother switching.

load more comments (1 replies)
[–] sederx 24 points 1 year ago

the only reason to stick to one of those init systems is that you already know everything about them and you dont want to relearn a bunch of stuff.

other than that i see 0 benefits to skip systemd

[–] [email protected] 23 points 1 year ago

Is the experience of trying new distros very cool? yes

Should you abandon systemd? no

systemd is not bloated and it's not insecure. If you don't have any problems, don't switch (unless you wanna have some fun trying new things, if you do, run a vm).

[–] [email protected] 22 points 1 year ago* (last edited 1 year ago) (3 children)

systemd is insecure, bloated, etc

[Citation needed]

If a distro that doesn't use systemd ends up booting much faster or being much easier to configure, maybe those are features you care about. But switching away from systemd in this case is merely an implementation detail. What you're really doing is moving from a distro to another one that serves you better.

Otherwise, the choice of init system has very little impact to the average user. Maybe it's worth it to switch init systems if you hate the syntax of unit files and/or the interface of systemctl/journalctl and you use them often enough to warrant the effort. The people who want to use alternatives to systemd without having such a practical issue with it are doing so for philosophical reasons.

load more comments (3 replies)
[–] [email protected] 19 points 1 year ago

If you have to ask, no.

I say this as someone who doesn't use systemd. There's not much benefit to it. It's cool to do if you're an enthusiast or experimentalist, but from a practical stand point, systemd is most practical.

I use gentoo with openRC btw.

[–] [email protected] 19 points 1 year ago

The biggest benefit would be to learn more about how unix systems work from the ground up. I'd say if you've had no problems ever with systemd then just stick to it. My linux usage predates systemd (by a lot) and I just want options kept open so I'm never forced onto it against my will.

[–] [email protected] 19 points 1 year ago* (last edited 1 year ago) (4 children)

Basically, if you do not see any reason to switch from systemd then you should not. The thing with systemd is that it is really big and complicated. If you just use defaults of your distro systemd works just fine, but if you want to (or have to) change something fundamental, then dealing with this monstrosity becomes a bit of pain. You basically end with the situation where you are in a war with your own PC. After some time of this, dealing with an init system that does exactly what you tell it to do feels refreshing. There is also the part, where some init systems (sysVinit and runit) boot faster then others (openRC and systemd), but it is not that significant. I use runit BTW. With my setup I spend much less time dealing with runit then I used to with systemd. That being said I still miss some of systemd features.

load more comments (4 replies)
[–] [email protected] 17 points 1 year ago (8 children)

I don't see any fundamental reason why systemd would be insecure. If anything, I would expect it to be less prone to security bugs than the conglomerations of shell scripts that used to be used for init systems.

The bloated argument seems to mostly come from people who don't understand systemd init is a separate thing from all the other systemd components. You can use just the init part and not the rest if you want. Also, systemd performs way better than the old init systems anyway. I suspect many of the those complaining online didn't really have first hand experience with the old init systems.

If a different init suits your needs better, then sure go with it. But for the vast majority of typical desktop/server stuff, systemd is probably the best option. That's why most distributions use it.

load more comments (8 replies)
[–] [email protected] 11 points 1 year ago (11 children)

Systemd vs anything else is mostly controversy, the outlet of a bunch of people that don't want Linux to evolve, become better and have more flexibility because it violates the UNIX philosophy and/or it is backed by big corp. Systemd was made to tackle a bunch of issues with poorly integrated tools and old architectures that aren't as good as they used to be. If you look at other operating systems. Even Apple has a better service manager (launchd) than what Linux had with init and friends.

Systemd is incredibly versatile and most people are unaware of its full potential. Apart from the obvious - start services - it can also run most of a base system with features such as networking (IPv4+IPV6, PBR), NTP, Timers (cron replacement), secure DNS resolutions, isolate processes, setup basic firewalls, port forwarding, centralize logging (in an easy way to query and read), monitor and restart services, detect hardware changes and react to them, mount filesystems, listen for connections in sockets and launch programs to handle incoming data, become your bootloader and... even run full fledged containers both privileged and non-privileged containers. Read this for more details: https://tadeubento.com/2023/systemd-hidden-gems-for-a-better-linux/

The question isn't "what is the benefit of removing this init system", it is "what I'll be missing if I remove it". Although it is possible to do all the above without Systemd, you'll end up with a lot of small integration pains and dozens of processes and different tools all wasting resources.

[–] [email protected] 3 points 1 year ago (1 children)

I would be interested in using a distro that uses only systemd for everything(preferably arch based). Is there such a distro? I know it can be done manually,but I lack the time or patience to do it at this time.

[–] [email protected] 3 points 1 year ago (1 children)

Debian isn't that far from it right now.

load more comments (1 replies)
load more comments (10 replies)
[–] [email protected] 10 points 1 year ago

As someone who've tried Gentoo on systemd and OpenRC, as well as Void with runit, I don't see any reason to use OpenRC over systemd. I never noticed any performance difference, and it has far less features. As for runit, if half the boot time for half the features is what you need, then go for it.

[–] [email protected] 8 points 1 year ago
[–] [email protected] 8 points 1 year ago* (last edited 1 year ago) (1 children)
[–] hunger 5 points 1 year ago (2 children)

Yeap, it is always the same set of poorly researched links that get pasted in threads like this.

Unix philosophy, evil corporate interests, insecure, bloated, entangled mess... it is these individuals thatbhave seen the light, notnthe silent majority that does all the work in distributions and when developing software that kind of opted withbtheir feet.

load more comments (2 replies)
[–] [email protected] 6 points 1 year ago (1 children)

My understanding is that systemd goes against traditional unix philosophy, but that from an end users perspective it will generally be a much better experience.

I've heard some init systems are maybe faster, but it's a very minor improvement if true and you're giving up a lot of features for it.

[–] [email protected] 3 points 1 year ago

systemd goes against traditional unix philosophy

It really doesn't, that's just propaganda. If systemd goes against the Unix philosophy due to having multiple binaries, by that logic so does coreutils.

[–] [email protected] 6 points 1 year ago

Short answer: if you're asking this, then it's not worth it.

Long answer: Ditching systemd in favor of something else is usually an act of experimentation. Folks that do it usually have had a negative experience with systemd, be it in its usage or from a problem they had that prevented them to boot their computers due to the tightly-coupled relationship between mainstream distros and systemd.

Also, preference is involved here, so you might prefer to assemble your system with independent pieces instead of a full-blown suite like systemd's. You might also not like systemd's UX so, as a user, you end up wanting to try something else.

[–] [email protected] 5 points 1 year ago

The complaints are just a meme at this point. If you have to ask, don't bother.

[–] [email protected] 4 points 1 year ago

Do it for the lulz

[–] [email protected] 3 points 1 year ago (1 children)

If you have to ask, the benefits of another init system than systemd starts and stops at "you look smart." I like runit a lot and would even recommend Void Linux as a daily driver if that's your speed, but honestly anyone who actually was around before systemd knew how much sysvinit and co sucked.

load more comments (1 replies)
[–] [email protected] 2 points 1 year ago (1 children)

If you want to try living without systemd, take a look at voidlinux - it uses runit instead. I made the jump from Fedora recently and I love it! Linux is once again the unix system I loved for 40+ years - it's rational, easy to understand and just works! As an added bonus, I do believe I get about 50% more life out of the battery (less busy-work going on?). What do I miss from systemd? Nothing really.

load more comments (1 replies)
load more comments
view more: next ›