this post was submitted on 26 Nov 2023
79 points (100.0% liked)

Linux

1257 readers
41 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
 

Hi all - I am learning about Linux and want to see if my understanding is correct on this - the list of major parts of any distro:

  1. the Linux Kernel
  2. GRUB or another bootloader
  3. one or more file systems (gotta work with files somehow, right?)
  4. one or more Shells (the terminal - bash, zsh, etc...)
  5. a Desktop Environment (the GUI, if included, like KDE or Gnome - does this include X11 or Wayland or are those separate from the DE?)
  6. a bunch of Default applications and daemons (is this where systemd fits int? I know about the GNU tools, SAMBA, CUPS, etc...)
  7. a Package Manager (apt, pacman, etc...)

Am I forgetting anything at this 50,000 foot level? I know there are lots of other things we can add, but what are the most important things that ALL Linux distributions include?

Thanks!

top 23 comments
sorted by: hot top controversial new old
[–] khorovodoved@lemm.ee 23 points 11 months ago* (last edited 11 months ago) (4 children)

I would say, that from most important to least important components are:

  1. kernel
  2. init system (systemd, openrc, runit...)
  3. C library (glibc, musl)
  4. filesystem
  5. coreutils
  6. shell
  7. bootloader
  8. package manager
  9. x11/Wayland (if any)
  10. sound system (if any)
  11. WM (if any)
  12. DE (if any)
[–] lseif@sopuli.xyz 4 points 11 months ago (1 children)

what do u mean by important? like 'essential to the system', or 'important to consider when choosing a distro', or what?

[–] khorovodoved@lemm.ee 7 points 11 months ago (1 children)

I mean "something out of ordinary about it affects your experience with this distro the most".

[–] lseif@sopuli.xyz 1 points 11 months ago
[–] ultra@feddit.ro 2 points 11 months ago (2 children)

Wouldn't the c library be more important than the init system?

[–] khorovodoved@lemm.ee 2 points 11 months ago (1 children)

You are probably right. It is probably even more important than kernel.

[–] ultra@feddit.ro 1 points 11 months ago

Not really.

load more comments (1 replies)
[–] bionicjoey@lemmy.ca 2 points 11 months ago (1 children)

I'm surprised you put shell so high when it tends to be less impactful in my experience. Like I care a lot more if my distro is using GNOME instead of KDE a lot more than if it's using bash instead of zsh. Plus it's easy to install and use a different shell

[–] khorovodoved@lemm.ee 3 points 11 months ago (1 children)

It is easy to install another shell indeed, but it is quite difficult to configure it. While installation of DE is usually done with just one command. And you can use linux without DE, but not without shell. Many distributions even do not install DE by default at all.

[–] bionicjoey@lemmy.ca 1 points 11 months ago

Okay but unless you are spending a lot of time in the command line, one (POSIX compliant) shell is as good as another. Like yes every distro needs a shell, but I don't much care which shell it is.

[–] tricoro@lemmy.ml 2 points 11 months ago* (last edited 11 months ago) (2 children)

One thing I don't know: if C is a compiled language already, what exactly does the C library do?

[–] lseif@sopuli.xyz 5 points 11 months ago* (last edited 11 months ago)

it is a dynamically linked library, meaning its not in the compiled binary, but its assumed to already be on the system. as opposed to a statically linked binary. this lowers the file size of the binaries, because most will use the standard library.

edit: this may not be 100% correct, but its the general idea

[–] khorovodoved@lemm.ee 4 points 11 months ago

Most C binaries usually do not contain everything needed for their execution. It would make them too platform-specific. What most c programs do is that they use standard c library from platform for low-level things and communication with the system like memory allocation or stdin/stdout things, for example.

[–] hottari@lemmy.ml 11 points 11 months ago
[–] funkajunk@lemm.ee 9 points 11 months ago

You pretty much got it, except for the fifth point.

A desktop environment ("DE") is separate from the compositor (X11 or Wayland), but can't exist without it.

At the end of the day, a DE is really just a "window manager" with a bunch of bundled applications, like taskbars/panels, a file manager, an app menu, etc. It's as minimal or as feature rich as you want it to be.

The window manager dictates what to draw on the screen and where, but the compositor is what actually does the work. One is kind of useless without the other.

Hopefully that makes sense, I'm not a rocket surgeon.

[–] 0x4E4F@infosec.pub 5 points 11 months ago

Systemd has gone way and beyond what was supposed to be a replacement for init.rc.

Most important thing... not ALL Linux distros include systemd as the default init system. That's the beauty of Linux (and POSIX in general), you can choose.

[–] 1984@lemmy.today 5 points 11 months ago* (last edited 11 months ago)

The list is generally correct but these days, systemd has made quite an impact also. If a distribution uses systemd, it has one software to handle everything from booting (instead of grub), handling start and status of all system services etc. Its probably the largest change to the Linux ecosystem in a long time.

X11 and Wayland are desktop protocols, so things like desktop environments and window managers depends on one or them to be installed. Without them, you don't get any graphics except for the console. It's all built on top of one of those.

[–] thelastknowngod@lemm.ee 4 points 11 months ago

It's easier to think about Linux on the context of what an individual application needs to run. Pretty much everything you do will have these components.

  • configuration
  • an executable
  • a communication mechanism (dbus, networking, web server, etc)
  • something that decides if the application runs or not (systemd, monit, docker/docker compose, kubernetes scheduler, or you as the user)
  • a way of accepting input (keyboard and mouse, web requests, database queries, etc)
  • a way of delivering an output (logging to unique log files, through syslog, or to stdout/stderr, showing something on a screen, playing a sound, returning a message to the client, etc)
  • storage (optional)
  • some cpu and memory capacity

That's really it. If something isn't working, it's pretty much exclusively going to fall into one of those categories. What that means is going to vary significantly from app to app but understanding this is how literally everything works makes the troubleshooting process a lot easier.

[–] chameleon@kbin.social 3 points 11 months ago

A biggie you miss is the toolchain: the compiler/binutils/linux-headers/libc/libstdc++ combination. The libc and usually libstdc++ are key components of any install. The other parts usually don't make it to non-dev-desktops, but the distro couldn't be made without them, so they're virtually always available as packages.

Only exception is if the entire distro is cross-compiled or it's made exclusively for containers, but those kinds of special distros break every rule imaginable anyway. Some might not even ship a bootloader or a Linux kernel by themselves.

[–] Mixel@feddit.de 2 points 11 months ago
[–] Herbstzeitlose@feddit.de 2 points 11 months ago
[–] jollyrogue@lemmy.ml 1 points 11 months ago

Package manager needs to be higher since Linux distros are software distribution projects mainly.

  1. Package manager
  2. Config tools
  3. Config defaults
  4. Kernel
  5. Init process
  6. Software
[–] kpw@kbin.social 1 points 11 months ago

Honestly, I wouldn't worry too much about how the OS works. If you're very ambitious, you could try to install Arch in a virtual machine environment: https://wiki.archlinux.org/title/Installation_guide

Installing Arch for the first time taught me a lot about how my system works, since you have to choose all the parts that make up your system yourself.