All these different programs are developed by different, independent development groups. They’re combined by Linux distributions, where they build on top of each other to make a complete “Linux” operating system. This is unlike Windows, which is developed entirely by Microsoft.

Bootloader

When you turn on your computer, your computer’s BIOS or UEFI firmware loads the software from your boot device. The first program that loads with any operating system is the boot loader. With Linux, this is generally the Grub boot loader.

If you have multiple operating systems installed, Grub provides a menu that allows you to choose between them — for example, if you have Linux installed in a dual-boot configuration, you can choose either Linux or Windows when you boot.

Grub might boot your Linux system almost instantly if you only have a single operating system installed, but it’s still there. Grub handles the process of actually booting Linux, issuing command-line options and allowing you to boot Linux in other ways for troubleshooting purposes. Without a boot loader, a Linux distribution just wouldn’t boot.

The Linux Kernel

The precise piece of software Grub boots is the Linux kernel. This is the part of the system that’s actually called “Linux.” The kernel is the core of the system. It manages your CPU, memory, and input/output devices like keyboard, mice, and displays. As the kernel speaks directly to the hardware, many hardware drivers are part of the Linux kernel and run within it.

All other software runs above the kernel. The kernel is the lowest-level piece of software, which interfaces with the hardware. It provides a layer of abstraction above the hardware, dealing with all the different hardware quirks so the rest of the system can care about them as little as possible. Windows uses the Windows NT kernel, and Linux uses the Linux kernel.

Daemons

Daemons are essentially background processes. They often start as part of the boot process, so they’re one of the next things that loads after the kernel and before you see your graphical login screen. Windows refers to such processes as “services,” while UNIX-like systems refer to them as “daemons.”

For example, crond, which manages scheduled tasks, is a daemon — the d at the end stands for “daemon.” syslogd is another daemon that traditionally manages your system log. Servers, such as the sshd server, run as daemons in the background. This ensures that they’re always running and listening for remote connections.

The Shell

Most Linux systems use the Bash shell by default. A shell provides a command processor interface, allowing you to control your computer by typing commands at a text interface. Shells can also run shell scripts, which are a collection of commands and operations run in the order specified in the script.

Even if you’re just using a graphical desktop, shells are running and being used in the background. When you open a terminal window, you see a shell prompt.

Shell Utilities

The shell provides some basic built-in commands, but most of the shell commands Linux users use aren’t built into the shell. For example, commands as critical as the cp command for copying a file, ls command for listing files in a directory, and rm command for deleting files are part of the GNU Core Utilities package.

Linux systems wouldn’t function without these critical utilities. In fact, the Bash shell itself is part of the GNU project. That’s why there’s been controversy over whether Linux should truly be called “Linux” or “GNU/Linux”. Critics of the “Linux” name correctly point out that much more software goes into typical Linux systems, which often isn’t acknowledged. Critics of the “GNU/Linux” name correctly point out that a typical Linux system also includes other critical software that the name “GNU/Linux” doesn’t encompass.

Not all of the shell utilities and command-line programs are developed by the GNU project. Some commands and terminal programs each have their own project dedicated to them.

X.org Graphical Server

The graphical desktop part of Linux isn’t part of the Linux kernel. It’s provided by a type of package known as an “X server”, as it implements the “X window system” that originated many years ago.

Currently, the most popular X server — or graphical server — is X.org. When you see a graphical login window or desktop appear, that’s X.org working its magic. The entire graphical system is run by X.org, which interfaces with your video card, monitor, mouse, and other devices.

X.org doesn’t provide the full desktop environment, just a graphical system that desktop environments and toolkits can build on top of.

What you’re really using on a Linux desktop is a desktop environment. For example, Ubuntu includes the Unity desktop environment, Fedora includes GNOME, Kubuntu includes KDE, and Mint generally includes Cinnamon or MATE. These desktop environments provide everything you see — the desktop background, panels, window title bars and borders.

They also generally include their own utilities built to fit in with the desktop environment as a whole. For example, GNOME and Unity include the Nautilus file manager developed as a part of GNOME, whereas KDE includes the Dolphin file manager developed as a part of the KDE project.

Desktop Programs

Not every desktop program is a part of a desktop environment. For example, Firefox and Chrome are desktop-environment agnostic. They’re just programs that can run normally on top of any desktop environment. OpenOffice.org is another suite of programs that isn’t tied to a particular desktop environment, either.

You can run any Linux desktop program in any desktop environment, but ones designed for certain desktop environments may look out of place or drag in other processes. For example, if you tried to run GNOME’s Nautilus file manager on KDE, it would look out of place, require you to install a variety of GNOME libraries, and probably start GNOME desktop processes in the background when you opened it. But it would run and be usable.

Linux distributions perform the last step steps. They take all this software, combine it so it works well together, and add their own necessary utilities. For example, distributions create their own operating system installers so you can actually install Linux, as well as package managers for installing additional software and keeping your installed software updated.

Even if you’re just using a graphical desktop, shells are running and being used in the background.

Is this right? I thought shells were basically an interface through which you can call scripts, executables, etc. Does a shell actual run in the background? Wouldn't that just be a process or a script? I'm just interested in getting a better of understanding of how linux works.

Good question, maybe I wasn't precise enough. My understanding is that it's likely a .sh script will run at some point, and that's essentially running using a shell. The shell is essentially a command-line interpreter and is interpreting scripts even if it's running in the background and not visible.

At least, that's my understanding... I think I'm right, but I'm not an expert on everything. The main point was that the shell is crucial to the system even if you never open a Terminal window and use it yourself. If you ripped the shell out of a Linux system, you'd have all kinds of problems.

If there's a Linux expert in here, feel free to correct me on whether the shell can actually be considered to be running in the background or not. I'll hapilly edit the post and fix things if that was a little mistake.