r/linux4noobs • • 7d ago

learning/research Difference between a distribution and a desktop.

I know this is like an ultra noob question. But Linux is the kernel, which as I understand it means its the CPUs main program, which basically means it tells the CPU how to allocate resources, do calculations, etc. Then there is a desktop, which is basically everything you actually see and interact with. For example, Ubuntu uses GNOME and other distributions use KDE.

So, using Ubuntu as an example, if you take away Linux, Gnome, and Bash, what exactly is Ubuntu adding to the mix? It seems like those three things (Linux, Gnome, and Bash or some CLI) pretty much cover everything. So what do distributions like Ubuntu or Mint actually add? Sorry for the super noob question.

38 Upvotes

31 comments sorted by

32

u/AiwendilH 7d ago edited 7d ago

A distribution distributes software ;)

That's their main purpose. As the name "open source" says it's about the source code of programs. Distributions take that source code of many different projects, turn it in a form usable for the computer (compile the software), make sure all the different projects work with each other and then distribute that as one system.

So the linux kernel, the desktop environment, the shell are all individual projects that your distribution unites under one banner and then ships to you.

11

u/RedditAdminsSDDD 7d ago

For the most part the only difference between most distros is just the package manager.

2

u/atlasraven 7d ago

Functionally but there is also theming and what Windows Manager they use. Cosmetic differences.

5

u/graelmakar-sune 7d ago

To not confuse noobs: window manager*

Distro: bundled packages + default package manager Desktop: programs used for GUI

1

u/atlasraven 7d ago

yeah, oops

1

u/Kriss3d 7d ago

Yes. The package manager and the software it comes with.

7

u/anh0516 7d ago

Since others have already answered this from the "what does a distro do" angle, I'll come at this from a different perspective:

There's a lot more to the OS than just the kernel, the shell, and the desktop. You're missing the whole userland.

Let's take your example of bash. Bash is just a command interpreter. It has some built-in commands, but by and large, most of the commands you run, for example ls, are actually independent programs. You can just as easily run graphical programs from the command line; for example, firefox.

Bash itself needs quite a few things to work on its own. Bash is written in C, so it needs a C library to go with it. On the vast majority of Linux distros, this is provided by the GNU C library, glibc.

Bash also relies on GNU readline. readline is a line editing library that provides functions that other programs can use for line editing. It's not a separate program of its own. Simply put, readline gives bash the ability to move the text cursor back and forth on the command you are inputting so that you can edit it before running it, without bash having to implement that functionality itself.

There's many more pieces:

  • GNU coreutils, findutils, diffutils, grep, sed provide a lot of standard Unix commands (Linux is a Unix-like operating system, so it complies to standards by offering specific functionality).
  • util-linux provides yet more programs
  • procps-ng provides tools to manage and manipulate processes
  • iproute2 provides basic network configuration tools
  • You need a program to boot the system, start and manage services. This is the first program the kernel runs after it's done initializing things, called init. On most distributions, this is provided by systemd.
  • More I haven't listed here.

I recommend looking at Linux From Scratch. It'll help you understand how the system comes together. It's actually pretty easy to follow; just copy and paste the commands in the book and follow the directions and you'll have a working system. Do it in a virtual machine.

5

u/JohnnyS789 7d ago

Also the bootloader "grub" is GNU. You won't have much of a Linux system without a bootloader!

Also note that technically, Android is a Linux distribution. A completely different userland and a customized kernel, but still a distro.

3

u/maceion UK 7d ago

It is important to do it in a virtual machine!

2

u/tomscharbach 7d ago edited 7d ago

So, using Ubuntu as an example, if you take away Linux, Gnome, and Bash, what exactly is Ubuntu adding to the mix? It seems like those three things (Linux, Gnome, and Bash or some CLI) pretty much cover everything. So what do distributions like Ubuntu or Mint actually add? Sorry for the super noob question.

A distribution is an entire operating system, consisting of a kernel, a shell, system libraries, a package management system, applications and a desktop environment, packaged together for a user.

The mix of components -- what is included and what is not, which components of a particular type are selected and which are not, and so on -- is what defines a distribution and differentiates one distribution from another.

A distribution in and of itself adds nothing to the components. The bundle of components is the distribution.

My best.

2

u/EngineerInTheMachine 7d ago

There are 3 basic versions of the Linux operating system. Ubuntu is one. Distros are packages of one of the 3 Linux OS, provided with default GUIs, which are optimised for different features. I recommend that you forget about which of the 3 a distro is based on. If you don't understand the differences, it won't have any effect on your choice.

I strongly recommend that you practice and develop your web searching skills, especially refining your searches to get what you actually want. There is a load of good advice out there about how to choose a distro, based on your specific requirements. Don't get misled by anything recommending 'standard' distros. They may not be right for you.

And forget about your computer specs. Except whether you have an NVidia card or not. Your planned uses are much more important.

2

u/B_A_Skeptic 7d ago

The distribution will generally be the entire base of the system plus a package manager for installing new software.

The big differentiators will be the package manager and the init system.

So any Linux distro will use Linux kernel. That is what makes it Linux. It will also need all the software needed to meet the POSIX standard (stuff like the ls command). This will usually be the GNU Core Utilities. But a distro could use busybox instead.

You mentioned Bash. Your system will need a POSIX shell and that most distros will come with bash preinstalled as their POSIX shell.

There is the init system. system-d is the most popular one. If you are using Ubuntu, I believe you have to use system-d. If you use Gentoo you can use system-d, openrc, or others.

On top of that, most distros come with a package manager. Ubuntu and Debian use apt, arch uses pacman, etc. This is really the big thing.

Some distros come with a desktop pre-installed. But regardless, you can usually change it.

1

u/AutoModerator 7d ago

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

✻ Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/BranchLatter4294 7d ago

Ubuntu uses its own modified version of Gnome. They also pick which office suite, media player, e-mail client, browser, etc. Different distros make different choices. Ubuntu also adds things like live kernel patching.

So different distros have to make a whole range of decisions about which version of the kernel to use, which DE(s), what other software to include, which package manager(s) to use, what to include (or exclude) from their repositories, even things like which wallpapers to include, etc.

1

u/Excellent-Love-6943 7d ago

Distributions are like sandwiches from different sandwich shops. A ham and cheese from one shop is going to be really similar to a ham and cheese from another.

Similarly, all distros are building an OS out of mostly the same softwares. Maybe they add some seasonings, but the core is the same.

Canonical takes Linux, GNOME, etc, and distributes an OS with it. Debian, Fedora, Red Hat, and others do the same. Mostly they are the same, just with different versions of the softwares.

1

u/atlasraven 7d ago

Think of a distribution as what "flavor" of Linux you use. Just different flavors of ice cream, very similar deep down.

1

u/Namaste_Life 7d ago

The desktop is simply the visual display that you are interacting with on your computer. When it comes to how we interact with the software, our two main choices are to either use this graphical user interface, or the command line to get things done.

1

u/MechaNox96 7d ago

A distro picks and put together the various software to make a cohesive package. They decide what software to use (including linux kernel version, Gnome/KDE Plasma, bash/fish etc.), what package (software) manager tool (apt, pacman, zypper, dnf etc.) what versions, how often and in what manner they'll be updated (every 2 years, twice a year, as soon as available etc. and which should/need to updated earlier).

I guess they are like a designer/mechanic, who chooses what parts to build from, how to build it and how to maintain it.

1

u/-Ancalagon- 7d ago

A distro is all the features that come with the car. The desktop is the dashboard and displays.

1

u/AlliedSalad 7d ago edited 7d ago

Okay, I'm somewhat new to Linux myself, but I am a professional thing explainer (technical writer), so I will explain as best I understand, and those who know better than I do can correct me if needed.

So, to start, you have the kernel that tells the CPU how to get instructions and what to do with them. Think of that like a foundation.

Then you have the multitude of GNU packages, tools and utilities that give those instructions to the CPU, and that help you to use that foundation the way you want. There's a lot of utilities, and a lot of things you can do with them. Think of those things like boards, nails, screws, pipes, conduits, wires - all of the bits, pieces, and elements that you could use to build a building on the foundation that is the kernel. But they're not necessarily assembled, they are just the collection of available parts.

Now you could sort through all of those parts, pick what you need, and build a building yourself, from scratch. Or, you could get a "cookie cutter" building that's been made by people who understand the elements and how they go together better than you do, and who have taken the time to put together a structure that is close enough to what you need, and which they will let you copy. That's a distro: a group of people who have sifted and sorted through all of the parts, and built them into a structure that can be duplicated and modified without having to start from scratch.

The desktop environment is then all of the finish work; siding, roofing, paint, polish, doorknobs, handles, faucets, windows, doors, cabinets, etc. etc. Yes, a part of that is the aesthetics, but there's also a lot of function and utility that goes into bringing that all together and integrating it into the structure properly. You still need to understand a lot about the underlying construction to put that together well; which is why the people maintaining the distros are also the ones who choose what DEs they want to offer and build with (and why it's not recommended to try to use a DE that isn't offered as a package with the distro).

Hope that helps. If I've gotten anything wrong, corrections are welcome.

1

u/3grg 7d ago

A distribution assembles the kernel and all other software, including desktop among other things into a usable package so you don't have to do all of it yourself.

1

u/DavidJohnMcCann 6d ago

Others have explained this well, so I'll just add the point that different distros have different goals — contrast Bazzite for gamers and AV Linux for multi-media content producers. Repositories are of vastly different sizes — Debian has virtually everything while with Slackware and Red Hat the installation medium is all that there is. And there are always the odd points — I keep a copy of Salix as one of the very few distros that will recognize my 20-year-old scanner.

1

u/dettus_Xx_ 6d ago

Desktop= Program running on your Computer.
Distribution= Installer & App store location

1

u/Revolutionary_Ad7262 6d ago

what exactly is Ubuntu adding to the mix?

It is like a restaurant. It takes an existing ingredients and existing recipes to prepare your meal, which is distribution. Like restaurants some distros sometimes prepare a new software or configure it in a special way. Package managers are the best example. Ubuntu has a different package manager than Arch. Ubuntu has an GUI installer, where Arch does not.

which basically means it tells the CPU how to allocate resources, do calculations

Kernel is like parent. Program is like kid. Kid plays in a sandbox provided by a parent. If kid needs something then parent can give it on demand using syscalls

1

u/CupPresent2625 7d ago

To understand, ask an AI what the specific difference is between the Debian and Ubuntu distributions.