this post was submitted on 26 Mar 2024
45 points (92.5% liked)

Linux

48310 readers
840 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
 

Why do they use Shell?

Sorry for bad English. English isn't my native languange

you are viewing a single comment's thread
view the rest of the comments
[–] stsquad@lemmy.ml 31 points 8 months ago (5 children)

While shell based RC systems do offer flexibility they also have downsides including copy and paste leading to subtly different behaviour across units. Dependency resolution was also a bit of a hack on top of scripts to deal with concepts like run levels.

The declarative approach of a proper configuration is a better and more scalable solution.

[–] dsemy@lemm.ee 11 points 8 months ago (4 children)

they also have downsides including copy and paste leading to subtly different behaviour across units

What does this mean? How is an imperative shell scripts doing something subtly different? Why won't a declarative config file do the same?

Dependency resolution was also a bit of a hack on top of scripts to deal with concepts like run levels.

Runlevels don't really have anything to do with dependency resolution though?

The declarative approach of a proper configuration is a better and more scalable solution.

Maybe it is, but you didn't explain why.

[–] chalk46@fedia.io 4 points 8 months ago* (last edited 8 months ago) (1 children)

in systemd runlevels are basically just targets (it still sets rc?.d symlinks in /etc akaik) which have services they want and are wanted by, it's the basis for dependency handling plus you get cool security features like syscall filtering, capability limits, user switching, etc

[–] dsemy@lemm.ee 2 points 8 months ago

Well in Void (using runit) each runlevel is just a directory with symlinks to the services.

I didn't realize systemd had these security features (except for user/group switching, which is pretty standard). You can get those with other init systems, but it's probably easier on systemd so I assume more people actually do it. I wonder if average distros take the time to harden their unit files.

load more comments (2 replies)
load more comments (2 replies)