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:
- the Linux Kernel
- GRUB or another bootloader
- one or more file systems (gotta work with files somehow, right?)
- one or more Shells (the terminal - bash, zsh, etc…)
- a Desktop Environment (the GUI, if included, like KDE or Gnome - does this include X11 or Wayland or are those separate from the DE?)
- a bunch of Default applications and daemons (is this where systemd fits int? I know about the GNU tools, SAMBA, CUPS, etc…)
- 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!
Hey! Great questions.
It seems like what you’re asking about are more what I’d think of as components of an a Linux “system” or “install.”
First off, it’s definitely worth saying that there aren’t a lot of rules that would apply to “all” Linux systems. Linux is huge in embedded systems, for instance, and it’s not terribly uncommon to find embedded Linux systems with no shells, no DE/WM, and no package manager. (I’m not 100% sure a filesystem is technically necessary. If it is, you can probably get away with something that’s… kinda sorta a filesystem. But I’ll get to that.)
Also, it’s very common to find “headless” systems without any graphical system whatsoever. Just text-mode. These are usually either servers that are intended to be interacted with over a network or embedded systems without screens. But there are a lot of them in the wild.
There’s also Linux From Scratch. You can decide for yourself whether it qualifies as a “distribution”, but it’s a way of running Linux on (typically) a PC (including things like DE’s) without a package manager.
All that I’d say are truly necessary for all Linux systems are 1) a bootloader, 2) a Linux kernel, 3) A PID 1 process which may or may not be an init system. (The “PID 1 process” is just the first process that is run by the Linux kernel after the kernel starts.)
The “bunch of default applications and daemons” feels like three or four different items to me:
As for your question about graphical systems, X11 and Wayland work a little differently. X11 is a graphical system that technically can be run without a desktop environment or window manager, but it’s pretty limited without one. The DE/WM runs as one or more separate processes communicating with X11 to add functionality like a taskbar, window decorations, the ability to have two or more separate windows and move them around and switch between them, etc. A Wayland “compositor” is generally the same process handling everything X11 would handle plus everything the DE/WM would handle. (Except for the Weston compositor that uses different “shells” for DE/WM kind of functionality.)
As far as things that might be missing from your list, I’ll mention the initrd/initramfs. Typically, the way things are done, when the Linux kernel is first loaded by the bootloader, it an “initial ramdisk” is also loaded. Basically, it creates a filesystem that lives only in ram and populates it from an archive file called an “initramfs”. (“initrd” is the older way to do the same thing.) Sometimes the initramfs is bundled into the same file as the kernel itself. But, that initial ramdisk provides an initial set of tools necessary to load the “main” root filesystem. The initramfs can also do some cool things like handling full disk encryption.
So, the whole list of typical components for a PC-installed Linux system to be interacted with directly as I’d personally construct it would be something like:
But techinically, you could have a functional, working “Linux system” with just:
Hopefully this all helps and answers your questions! Never stop learning. :D
You would need some non volatile storage to hold your bootloader be that on the network or local. Also any shell more complicated than tty will need to store config files to run.