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!

  • khorovodoved@lemm.ee
    ·
    edit-2
    1 year ago

    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)
    • tricoro@lemmy.ml
      ·
      edit-2
      1 year ago

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

      • khorovodoved@lemm.ee
        ·
        1 year 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.

  • funkajunk@lemm.ee
    ·
    1 year 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.

  • blobjim [he/him]
    ·
    edit-2
    1 year ago

    I don't know how helpful it is to split stuff out like that. Especially grouping so many things under "default applications and daemons", which is most of what a desktop distro is. Also depends largely on a PC vs server setup.

    should list an init system as its own bullet, which others have mentioned.

    "one or more shells" doesn't mean that much. Yes, every distro includes one but the only difference between a terminal and any other application is that a terminal needs to be able to escalate to root privileges. You can think of it as just another default (but special) application. A lot of stuff that people think about when they think of Linux distros is just various clever mechanisms for supporting the terminal shell. Like the PATH environment variable. If you are using actual desktop applications other than a terminal, there isn't any interaction with the terminal shell application.

    There's also fwupd, for updating firmware (your hardware is gonna be running out of date/buggy/insecure code if you don't have this).

    The dbus daemon falls under the "daemons" bullet but it's pretty important, like wayland/x11 it's another IPC mechanism you need for programs to work correctly.

    There's also the sound system. PipeWire is the modern one that implements the interfaces of various other sound systems so existing applications work with it. https://pipewire.org/ (PipeWire also has its own IPC protocol like dbus/wayland/x11).

    flatpak, snap, distrobox, toolbox, docker, podman, etc. for running sandboxed PC/server applications. I assume there are some programs that are flatpak-only these days.

    gsettings/dconf for Windows-registry like config that many programs use.

    There's also plugging in an implementation of the glibc Name Service Switch, which allows libc to use a mechanism other than /etc/passwd and related files for user accounts, internet service names, DNS resolution, etc. . systemd can provide NSS implementations using its own user account mechanism.

  • thelastknowngod@lemm.ee
    ·
    1 year 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.

  • jollyrogue@lemmy.ml
    ·
    1 year 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
  • VHS [he/him]
    ·
    1 year ago

    If I understand correctly, the filesystem driver is contained within the kernel for all linux-native filesystems (Ext4, XFS, BtrFS, F2FS, etc.), just as drivers for computer components and devices are. But drivers to access NTFS (Windows) and HFS+ (Mac OS) drives are programs in userspace

  • 0x4E4F@infosec.pub
    ·
    1 year 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.