r/linuxquestions • • Mar 11 '21

Resolved If Linux is just a kernel, where is the operating system?

What packages/files/software comprise the operating system exactly? Is it in the package manager? The coreutils, or some other important set of packages like Debian's base-files? Something else? In other words, how does a distribution communicate with the Linux kernel?

Maybe it's addressed in the LFS manual, but I haven't gotten a chance to look at it yet.

162 Upvotes

140 comments sorted by

169

u/berkough Mar 11 '21

Your question is exactly why Richard Stallman refers to it as "GNU/Linux." It's also why you can download Debian with the "KFreeBSD" kernel instead of the Linux kernel. Honestly, GNU.org does a good job of explaining the difference between userland and the kernel.

184

u/Downvote_machine_AMA Mar 11 '21

Not as good a job as I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.

128

u/ItsRogueRen Mar 11 '21

The one time a copypasta is actually a useful response

13

u/NoThanks93330 Mar 11 '21

I've seen this a few times now, where is it from?

37

u/Pingerfowder Mar 11 '21

The GNU/Linux rant is a piece of copypasta taken from a rant-like post Richard Stallman posted on the GNU blog around early-mid 2011.

[Source]

21

u/VikaashHarichandran Mar 11 '21

10 years into this copypasta and it's still fresh

10

u/Titanium125 Mar 11 '21

I have also heard Anthony from Linus Tech Tips say basically the same thing before in a video.

9

u/[deleted] Mar 11 '21

Yeah, it was a joke referring to this stallman post. It's become something of a meme

5

u/[deleted] Mar 11 '21

I think he himself says that he didn't write it.

110

u/zenpi1291 Mar 11 '21

"I use Linux as my operating system," I state proudly to the unkempt, bearded man. He swivels around in his desk chair with a devilish gleam in his eyes, ready to mansplain with extreme precision. "Actually", he says with a grin, "Linux is just the kernel. You use GNU+Linux!' I don't miss a beat and reply with a smirk, "I use Alpine, a distro that doesn't include the GNU Coreutils, or any other GNU code. It's Linux, but it's not GNU+Linux."

The smile quickly drops from the man's face. His body begins convulsing and he foams at the mouth and drops to the floor with a sickly thud. As he writhes around he screams "I-IT WAS COMPILED WITH GCC! THAT MEANS IT'S STILL GNU!" Coolly, I reply "If windows were compiled with GCC, would that make it GNU?" I interrupt his response with "-and work is being made on the kernel to make it more compiler-agnostic. Even if you were correct, you won't be for long."

With a sickly wheeze, the last of the man's life is ejected from his body. He lies on the floor, cold and limp. I've womansplained him to death.

17

u/GrilledGuru Mar 11 '21

Just seconds before drawing it's last breath, the old white straight oppressor manages to issue a last word... l...i...b...c

1

u/LOLTROLDUDES Mar 12 '21

Alpine uses musl

2

u/GrilledGuru Mar 12 '21

Yup. Exactly. ONE distribution of Linux is not GNU. Hardly qualifies as an argument for not using GNU when talking about Linux in general.

Tesla is electric so let's stop saying cars use gas :)

0

u/[deleted] Mar 11 '21

[deleted]

1

u/GrilledGuru Mar 11 '21

Well apart Alpine, not many Linux systems use it.

Most of them are really GNU/Linux.

1

u/ikidd Mar 12 '21

You monster.

4

u/JmbFountain Mar 11 '21

Well, Windows XP was apparently compiled using gcc on RHEL servers.

2

u/2112syrinx Mar 11 '21

Is this a copypasta or that actually happened?

1

u/zenpi1291 Mar 13 '21

copypasta

1

u/LOLTROLDUDES Mar 12 '21

The man then smiles.

"We recognize that Alpine isn't GNU/Linux and is "embedded Linux" on our FAQ!"

0

u/EnderAvi Mar 11 '21

This is gold

-2

u/ynotChanceNCounter Mar 11 '21

Someday, and I give it 5 years, somebody's gonna run one of those memory-safe coreutils things on BSD. The nVidia problem will have been solved, Proton will be reliable, Wayland will make it sexy, and the whole thing will be permissively licensed, so a bunch of Canonical-like companies will charge for flavor and sex appeal, rather than doing weird, sneaky shit, or charging for support.

The deeply religious among the Copylefticans will form a suicide cult when we finally prove that EEE has nothing to do with the pace of FOSS Unix, and I will dance. I don't dance.

1

u/T0x1cL Mar 12 '21

What?

3

u/ynotChanceNCounter Mar 12 '21

Actually, still having stuff open, I decided screw it, the background noise in my ear is a really boring lecture.

  • "Memory-safe coreutils" - Me being cheeky about C vs. those kinda-arrogant modern languages (like Rust.) There are some permissively-licensed coreutils replacements floating around the internet, and some of them look like they might be pretty good someday.

  • BSD - Most Unixes (duh)

  • The nVidia problem: You cannot enjoy sweet modern graphical goodness (nor CUDA, probably) on the BSDs. High-end gaming is iffy at best. VR is right out.

  • Proton: Valve's increasingly reliable compatibility layer for Windows games on Linux. On BSD(s)? Someday...

  • Wayland: X11 ded

  • Permissively licensed: copyleft is well-intentioned, but it was designed to combat a completely different proprietary software industry, and programmers need food

  • Canonical-like companies: make their money on FOSS OSs

  • Flavor and sex appeal: people sure do like Mac/Quartz/Aqua/etc, which is a decent example of something for which you could charge money, under a proprietary license, without affecting the underlying, permissively licensed OS at all

  • Weird, sneaky shit: What Canonical does instead, because copyleft makes things complicated. Amazon affiliate link in the app launcher, Snap store is proprietary, "run your own store" is disingenuous...

  • Charging for support: an unreliable way to make money for most purposes, and fucking rude for an operating system. Charge for enterprise support, sure, or for extended support, but come on.

  • The deeply religious among the Copylefticans: People who revere the "clean room" effort of the original GNU devs, but call it FUD when you point out that MIT/BSD/Apache-license devs have to navigate the same minefield with respect to copyleft code

  • Suicide cult: Jonestown

  • EEE: Embrace, Extend, Extinguish, the last argument "for" copyleft licenses, and the only thing against which they actually protect

  • The pace of FOSS Unix: slow as fuck

  • Dancing: something I don't do

1

u/ynotChanceNCounter Mar 12 '21

Frankly, this is one of those where, if you don't know any of those terms, it might look like a crazy person's ramblings, but I'd rather ask which of those terms you don't know and then call you a noob or something.

16

u/hblok Mar 11 '21

I also like how he explains Android in similar vain:

"Android is very different from the GNU/Linux operating system because it contains very little of GNU. Indeed, just about the only component in common between Android and GNU/Linux is Linux, the kernel. People who erroneously think "Linux" refers to the entire GNU/Linux combination get tied in knots by these facts, and make paradoxical statements such as "Android contains Linux, but it isn't Linux". If we avoid starting from the confusion, the situation is simple: Android contains Linux, but not GNU; thus, Android and GNU/Linux are mostly different."

1

u/[deleted] Mar 11 '21

I've seen this many times before and thought it was just a meme, didn't know how informative this actually is.

4

u/soronixa Mar 11 '21 edited Nov 21 '21

[deleted]

3

u/ndgnuh Mar 11 '21

smooth

3

u/rplrd Mar 11 '21

Was looking for this

17

u/Manny__C Mar 11 '21 edited Mar 11 '21

But also not all Linux distros are necessarily GNU. One may run KDE instead of gnome, use clang instead of gcc, use musl instead of glibc etc...

-18

u/Bro666 Mar 11 '21

First of all "KDE" is a community, i.e. a bunch of people, so you can't run KDE on your computer. If you are thinking of the desktop the KDE Community produces, that would be Plasma.

Secondly, Plasma (if it is that what you are referring to) and most of its predecessors are distributed under GNU-approved license and has been for nearly 20 years, so no different from GNOME.

33

u/Se7enLC Mar 11 '21

ACKSHULLY...

From 1998 to 2010 KDE WAS the name of the software. The K Desktop Environment. Then until 2014 it was "KDE Software Compilation" (uninspired name). "Plasma" has only existed since 2014 because the developers are trying to fix the fact that the community and software are called the same thing.

https://en.wikipedia.org/wiki/KDE_Software_Compilation

You're basically the person trying to convince everyone to call them "Lego Bricks" and not "Legos".

-8

u/Bro666 Mar 11 '21

Yes, you are correct. Up until seven years ago "KDE" was used to designate the software.

As the poster above was talking in the present, a period of time in which KDE is not the name of the software, but designates the community, I was setting the record straight for that.

9

u/Durpn_Hard Mar 11 '21

This is why normal people hate the linux community

14

u/Se7enLC Mar 11 '21

Some people don't understand the difference between helpful contributions to a discussion and being a pedantic asshole in a way that benefits nobody.

3

u/Kingizzardthelizard Mar 11 '21

He's not wrong, though

3

u/Se7enLC Mar 12 '21

What's especially funny/ironic is that KDE (not Plasma) wasn't initially GPL licensed. So the point being made about "what about Linux distributions that don't use GNU" is absolutely valid.

https://lwn.net/Articles/463442/

20

u/Manny__C Mar 11 '21

By KDE of course I meant the totality of the software developed by its community, which includes Plasma. I assumed that was obvious from the context. (what does it mean to "run people on a computer"?)

Also, since we are being picky, being GNU or being licensed under GPL is not exactly the same.

Also note that KDE makes extensive use of Qt which, while being GPL, also requires you to grant them ownership of the IP, so that's something to be careful about.

2

u/DasHesslon Mar 11 '21

Would that mean that software published under the MIT license was engineered at MIT? /s

9

u/GrilledGuru Mar 11 '21

Well being distributed under the GPL does not make a software "GNU".

Both the author and the GNU project must recognize the said software as part of the GNU project.

I am not sure but I think Gnome is "the GNU desktop" whereas Plasma is simply a DE released under the GPL.

3

u/sogun123 Mar 11 '21

Gnome is not GNU but Freedesktop project

3

u/GrilledGuru Mar 11 '21

What makes you say that it is not GNU?

  • it was heavily supported by the GNU project until Qt offered a Foss version. The GNU project and the fsf used their name to add traction to Gnome

  • the G in Gnome is for GNU.

  • Gnome has officially been a Gnu Project.

Please find below some material to back this:

https://unix.stackexchange.com/questions/141114/what-is-the-relationship-between-gnu-and-gnome

https://www.gnu.org/press/gnome-1.0.html

So OK gnome may not be today officially advertised a Gnu Project but it has been and keeps strong ties with it.

0

u/sogun123 Mar 14 '21

Hm, so I checked it. I was wrong, not freedesktop. But Gnome is not GNU. Being GNU project means, that it is developed and funded by GNU. But as you can see on gnome.org. Gnome is governed by Gnome foundation, so it is independent now. No GNU, at least anymore. Also the link from stackexchange you posted says it is not connected anymore...

0

u/[deleted] Mar 11 '21

[deleted]

4

u/GrilledGuru Mar 11 '21 edited Mar 11 '21

I would not say "just like Plasma".

  • it was heavily supported by the GNU project until Qt offered a Foss version. The GNU project and the fsf used their name to add traction to Gnome

  • the G in Gnome is for GNU.

  • Gnome has officially been a Gnu Project.

Please find below some material to back this:

https://unix.stackexchange.com/questions/141114/what-is-the-relationship-between-gnu-and-gnome

https://www.gnu.org/press/gnome-1.0.html

So OK gnome may not be today officially a Gnu Project but it's ties with the project are much stronger than Plasma. IMHO.

1

u/[deleted] Mar 12 '21

You are actually right. So it was created by the GNU Project after all...

4

u/dscottboggs Mar 11 '21

I don't know if that's an adequate explanation of all of the interchangeable parts that people would think of as an "OS" -- especially for desktop OS's like Elementary. I think at least systemd or whatever init system, Grub, and the desktop environment deserve inclusion.

So, OP, I guess what I'm saying is, there's no one "OS" that is linux -- it's a set of interchangeable pieces that distributions package into an OS

2

u/[deleted] Mar 11 '21 edited Mar 11 '21

I've been googling GNU OS for a while and haven't been able to find anything, is there a pure version of GNU Linux which isn't a distro? When I do neofetch --asicii_distro gnu it shows that GNU logo but I haven't been able to find a definitive GNU operating system, their website GNU.org recommends distributions like Debian and Suse so has the "GNU" operating itself disappeared?

4

u/UrulokiSlayer Mar 11 '21

Guix is the distro made by the GNU Project. Matter of fact, it doesn't use Linux by default, the kernel that uses is Hurd, the GNU kernel. But it can also be used with Linux-libre (since after several decades Hurd isn't completed yet). But while being the official distro made by the GNU Project, it is considered the FSF as just another distro.

1

u/[deleted] Mar 11 '21

Ah thanks

1

u/LOLTROLDUDES Mar 12 '21

Technically if you use GNU Hurd, however Hurd is still in unstable mode and none of your drivers will work.

13

u/Xandaros Mar 11 '21

The operating system is what bridges the gap between hardware and software. On Linux systems, this is the kernel. Some people argue that userland programs are also part of the OS, but they are clearly using a different definition of OS.

The Operating System, Linux, is what initialises the CPU, handles interrupts, manages drivers, etc. It is also responsible for starting the init system. (Or any program you tell it to, really... ideally it would be something that starts all the other services you want running, though, like systemd-initd)

A distribution is really just a bundle of Linux and a number of userspace programs to go along with it. All the userspace programs are freely replaceable (and you don't have to use any GNU software if you don't want to - see Alpine Linux for example)

Sine Linux adheres to the POSIX standard, for the most part, you can also replace the kernel and run your userspace programs on a BSD, for example. They are entirely separate.

3

u/[deleted] Mar 11 '21

So I guess in this sense, "distribution" means just a choice of programs and utilities made accessible to the user.

2

u/Xandaros Mar 11 '21

It's more what it ships with. You can take an Ubuntu and turn it into a CentOS if you are dedicated enough, replacing each component.

The main parts of a distribution are the init system (systemd/sysvinit/...) and the package manager (apt-get, yum, pacman, ...) Those are usually the hardest to swap out, since they are so interconnected to the rest. (Package manager is usually what is used to install everything else and it keeps track of what is installed, which files belong to what package, etc. The init system manages all the services, so it has to know which services exist, how to control them, etc.)

But, for the most part, a distribution really is just a list of software that is to be installed alongside the kernel, as well as some configuration. (An important bit of configuration that will influence many people's choice is the package repositories you have access to by default. Many distributions maintain their own repositories, which differing requirements. For example, Arch Linux always wants the newest version of a package in their repos. Ubuntu, on the other hand, wants packages that always work together, even if you sometimes need to go a bit older. Debian Stable doesn't care about new or old. Just make sure it works and it will continue to work for a long time.)

1

u/LOLTROLDUDES Mar 12 '21

Android should be called Linux.

MacOS should be called XNU (since that's their kernel).

Windows should be called NT (since that's their kernel).

Linux alone doesn't comply with POSIX btw, in fact in GNU tools there are settings to turn on and off full POSIX compatibility.

48

u/willpower_11 Mar 11 '21

insert GNU/Linux interjection here

21

u/loopsdeer Mar 11 '21

What you're referring to as the GNU/Linux interjection is actually the GNU/GNU/Linux GNUterjection.

1

u/LOLTROLDUDES Mar 12 '21

*GNU GNU/Linux interjection

35

u/CryptoTheGrey Mar 11 '21

All these technical responses do not take into account how language works. Linux, in common language, refers to both the kernel and the operating systems that use it. It doesn't matter what is rational or original or technically more correct. What matters is that in the public consciousness it is called Linux. It is a silly qualm to get so upset about. But if you honestly believe in calling it GNU/Linux feel free to do so. If the public consciousness also thinks that terminology is more useful it will get adopted. Otherwise go 'well actually' some important misinformation, there is plenty.

12

u/billFoldDog Mar 11 '21

This is why some people argue that Android isn't really Linux even though it uses the Linux kernel.

That's a fun holy war :D

6

u/istarian Mar 11 '21

That's a much more practical dustinction than the GNU one though, since the Android kernel is actually modified considerably and there is undoubtedly a lot of other software you'd never find on any typical Linux system.

6

u/billFoldDog Mar 11 '21

My stance is that Linux is more than just the kernel and the software, and that it includes the community around it. Most people don't seem to like that, though.

1

u/istarian Mar 11 '21

I'm not sure how you figure that works.

If I take a laptop (and essential accessories) to a desert island with no connectivity and somehow have power to run a laptop and install Ubuntu, my laptop is now running Linux.

5

u/billFoldDog Mar 11 '21

You would still be connected to the community. You would have received binaries and documentation from them.

3

u/[deleted] Mar 11 '21

Yes that's true, instead of people calling it GNU/Linux they call it for short Linux which is better in conversations. Back then maybe Linux was just something like MS Access nowadays, study once in college forget about it later, but now a lot of companies and end users started adopting the OS so the language, how you said, adopted another term for it.

2

u/bionor Mar 11 '21

Very true :) the human aspect of language is important.

1

u/Gloomy_Magician_536 Mar 01 '23

I would make the argument that not because people calls it that way, it means it's okay, giving as example the fact that not because people call a hypothesis a "theory" it means that it's a theory. But if you think it, nobody in the scientific community would make the mistake of saying theory when they meant hypothesis. It's only the outsiders who make such a mistake.

In a similar way, it's the FOSS community who calls the OS as plain Linux and if we're able to communicate effectively, then there's nothing wrong with it. Also, we usually default for the easier way of speaking and centuries of languages evolution are proof of that.

1

u/atherinn Mar 11 '21

Normally I’d agree with you but this instance is a good opportunity for them to learn a little more about how everything works. You can either reply “nah, it’s an OS” or you can explain why people say it’s just the kernel.

3

u/zeebrow Mar 11 '21

Who do you mean by "them"? The denizens of /r/linuxquestions, or a group of girls you met at the pool?

1

u/atherinn Mar 11 '21

I was just referring to OP (singular them) because they were asking a question about how it works. All I was trying to say was that it's not such a bad thing to explain what it technically is while explaining how referring to it as an OS is just fine. Didn't mean any offense by it. I'm kind of a noob too so learning the technical aspect and also learning that calling it an OS isn't incorrect is useful to me too.

2

u/Kingizzardthelizard Mar 11 '21

lol why are you being downvoted?

1

u/CryptoTheGrey Mar 12 '21

It is extremely confusing to newcomers to hear everything (OS, kernel, community) referred to as Linux and then, when they ask questions, be told they are wrong for calling the operating system Linux. It is fine to point out that there is the Linux kernel and GNU stack but my issue is with the self righteousness of people who don't like the whole also being called Linux

2

u/atherinn Mar 12 '21

That's totally fair, man. I figured the OP was asking for those details in this question but I do see your point.

-1

u/LOLTROLDUDES Mar 12 '21

Yes and there is nothing wrong with newspeak in 1984 since everybody uses it.

1

u/DFatDuck Mar 12 '21

No. Newspeak in 1984 restricts people's freedom of thought and expression. This doesn't

1

u/LOLTROLDUDES Mar 13 '21

And Newspeak is in Britain, this isn't. You could come up with a lot of other reasons.

My point was that just because language is commonly used (like the n-word to refer to black people) doesn't mean anyone trying to change it is a lunatic (for example the people who told everyone how racist the n-word was).

1

u/DFatDuck Mar 13 '21

Name changes are pretty common. Example: Burma/Myanmar

34

u/aioeu Mar 11 '21

That all depends on how you define "operating system", doesn't it?

Ultimately people name things in whatever ways they find convenient. Pick a definition that suits your purpose.

5

u/thexavier666 Mar 11 '21

I always thought that the operating system = kernel + userspace programs

ubuntu = linux + (gnu + gnome applications)

debian (server edition) = linux + gnu

9

u/Mukhasim Mar 11 '21

The point is that the set of userspace programs you define as part of the "operating system" has very fuzzy boundaries. Are solitaire games part of the OS just because they ship with it and are part of some default install? To use a non-Linux example, is Minesweeper part of the Windows OS? Maybe, maybe not: you could answer either way and the answer doesn't matter.

4

u/thexavier666 Mar 11 '21

Are solitaire games part of the OS just because they ship with it and are part of some default install?

If it ships with the OS, it's a part of THAT OS. Some other OS might not use Solitaire. I think that without userspace programs, the OS will work fine, but a user might not be able to "use" it.

But I'll agree that deciding upon the exact definition of OS is pointless.

1

u/LOLTROLDUDES Mar 12 '21

I've seen a diagram by someone who supports the usage of the word "Linux." The diagram showed three application levels: kernel (Linux), userspace utilities (five programs listed as seperate programs even though if you look them up they're all GNU programs) and user applications (presumably also preinstalled ones). The kernel is Linux, the kernel+userspace is GNU/Linux, and GNU/Linux+ user apps is the distro. Whether it should be GNU/Linux or Linux is a seperate debate than whether it should be GNU/systemd/Linux or something so that's irrelevant.

1

u/Mukhasim Mar 12 '21 edited Mar 12 '21

What's a "utility" and what's an "application" is pretty fuzzy and depends on your point of view. If you can't clearly define that classification, then using it as part of your definition doesn't help much. You've defined "operating system" unambiguously, except that you've defined it in terms that are themselves ambiguous, so when we look at particular pieces of software we still don't know what's part of the OS.

These days the main application for most users is really the web browser. In software terms a web browser belongs in the same layer as classic user applications like word processors and web browsers spreadsheets. However, the way it's used these days a browser isn't really an application in itself, it's a software environment used to access the real applications, which are websites. We even have people calling the browser an OS in itself.

So is the browser OS or application? Again, it depends on your point of view.

From the user's point of view I'd argue that it is probably part of the OS. The user's definition of "application" can be boiled down to "what did I buy the computer for". Business users buy a computer to run an office suite, other people buy a computer to browse Reddit or play Minecraft. Nobody buys a computer to run Chrome or Firefox. They buy it to do stuff that runs in Chrome or Firefox.

But then again, if you've seen what some parts of the corporate world have done with custom Excel programming, you can see how Excel is actually not so different from a browser: it is a programming environment, not just a tool for users, and some users spend much of their day using software that runs in Excel. If this is true then it's a problem for our analysis, because the spreadsheet is the classic example of an application.

What's more, in 1995 I would've called the browser an application. It was used to read documents. The transition to being more OS-like didn't happen right away when Javascript was added, it happened gradually as people created more and more complex websites that used the browser environment to create an application-like experience.

So, can a piece of software change over time from being application to being OS? And can this happen not because of changes to the software itself, but because of what other people have done with it? To this I say: maybe.

5

u/bss03 Mar 11 '21 edited Mar 11 '21

That all depends on how you define "operating system", doesn't it?

And, it's a pretty ambiguous term. If you just want MS-DOS 3.3 level features, you basically just need the kernel, bash, and mount. If you want MS Windows XP level features, you need a lot more. Both of those were sold as an "Operating System".

Unikernels, e.g., select a particular suite of userland applications, find all their dependencies throughout the stack (including OS), and combine just them into a kernel that can wake-on-lan and respond before the TCP connect() timeout expires.

12

u/parl Mar 11 '21 edited Mar 11 '21

This is why some call it GNU/Linux. GNU is the much of the rest of a distribution which communicates with the user programs and with the Linux kernel. OTOH, mostly purists call it that. Most folks just say Linux. You pays no money and you takes your choice.

Also some programs which directly interact with the users are part of GNU. GNU stands for GNU's Not Unix. (Honest)

Originally GNU was going to have a kernel, but it hasn't (yet?) been fully implemented. It's called Hurd.

4

u/bigfig Mar 11 '21 edited Mar 11 '21

In other words, how does a distribution communicate with the Linux kernel? Most of my professional experience is self taught, but I did go back to school for a formal advanced degree and humiliatingly I had to sit through an introductory class (at a well regarded school) that harped on OS versus Kernel, versus application software. You are sort of mixing up types of definitions. The term OS is really only useful in contrasting what you want to do from how it's done.

So you obtain a computer in order to get some work done. Say you want to write a screenplay, and you choose LibreOffice or LyX. That's your application software. Everything else in support of that is the OS, mediating how your application communicates with the hardware (though maybe there is unused application software you don't need). The kernel is part of the OS, it's just running at a very highly privileged mode, ring level zero. I would not get caught up with questions about whether your compiler is part of the OS. For old school Windows no, it's not, but with *nix so much is included that the distinctions seem increasingly pedantic, artificial even.

That link above is a good first stab at things from the level you are looking at.

3

u/[deleted] Mar 11 '21

Some terms in computing do not fit into nice, easily definable boxes.

This is one of them.

> In other words, how does a distribution program communicate with the Linux kernel?

Via system calls. All a distro essentially is, is a collection of programs and libraries.

2

u/Dandedoo Mar 11 '21

GNU coreutils, bash and gcc are a big part of it. As well as glibc.

It’s this software that makes some people refer to GNU/Linux.

I suppose everything builds from there, depending what kind of distro you’re building. More programs, libraries. Graphics platforms (xorg) and a desktop environment for a desktop distro, etc.

2

u/sidusnare Senior Systems Engineer Mar 11 '21

The Linux Kernel is the kernel, or base, or core, of the operating system. If you change it out, and you can, you don't have Linux any more.

Part of many people's confusion is that Windows is called an OS, but you can't easily see the separation between it's kernel, init, service manager, and desktop environment, it all looks and feels like the OS, but it's not.

The core utilities, especially the init, feel like the OS, but they're really not. As a demonstration, consider Debian, Devuan, and Android. These are all Linux OS distributions, however everything between kernel boot and user login is completely different.

When people talk about Operating Systems, they usually casually talk about more than just the Operating System, and the nuance of what Operating System actually means is only ever of importance when you have discussions like these.

TLDR: The kernel is the OS, but splitting hairs over it isn't useful usually

1

u/LOLTROLDUDES Mar 12 '21

Well MacOS is a FreeBSD distribution then.

1

u/sidusnare Senior Systems Engineer Mar 12 '21

Ah, no. You see Apple isn't running the FreeBSD kernel. Apple MacOS runs the XNU kernel. The XNU kernel was based on the Mach Microkernel, which was a microkernel built at CMU. Mach was built as a research project, as a microkernel replacement for the monolithic BSD kernel. So Mach has compatible interfaces to the BSD kernel, but is wholly different from the FreeBSD kernel. While Mach is a suitable drop in replacement for the BSD kernel, I don't think XNU would swap out as freely.

GNU Hurd is also a Mach derivative, so you can run a GNU\GNU system if you want to.

So MacOS has middleware that is both derivative of and directly from the FreeBSD project, while it has a kernel that was based on a BSD replacement kernel.

If you want to refer to Linux as GNU\Linux, you'd refer to MacOS as Mac\XNU, there is too much proprietary code to call it GNU\XNU, thought You could make an argument if you went and got an install of OpenDarwin for calling it GNU\XNU.

1

u/catwok Mar 12 '21

Sometimes it is worth reading username of a response -- wait unless.. am I being trolled?

2

u/sidusnare Senior Systems Engineer Mar 12 '21

I didn't mind, in case someone had the same thought, or thought he had a good point. Now it's explained.

1

u/catwok Mar 12 '21

I admit I learned more then I liked about Apple OS' ;D

2

u/sidusnare Senior Systems Engineer Mar 12 '21

Yea, well, you pick things up when you're a professional that has to deal with a diverse install base.

6

u/[deleted] Mar 11 '21

The Linux kernel is a more important piece of work. The other GNU tools are easily replaceable.

8

u/patatahooligan Mar 11 '21

Your opinion on what is important has nothing to do with what constitutes an operating system.

2

u/[deleted] Mar 11 '21

What really made Linux popular? It was the new kernel with a new design never seen before (kinda dramatic but...). The GNU tools were used just cause Linus didn't wanna spend a lot of time making his own compiler, utils etc. Even though they are good applications that everyone uses, they are easily replaceable (ex. Alpine Linux). If Linux didn't use GNU software, and the FSF still stuck to the Hurd kernel, they wouldn't be as popular as they are today.

4

u/HCrikki Mar 11 '21

What really made Linux popular?

The tech press running with the term until the whole thing got referred to as "linux".

1

u/patatahooligan Mar 11 '21

This is all still completely irrelevant to what OP is asking.

What packages/files/software comprise the operating system exactly?

0

u/[deleted] Mar 11 '21

Shell. Compiler. Coreutils. Libraries. i.e bash, gcc, glibc. That’s it. I wouldn’t call that an OS.

2

u/toric5 Mar 11 '21

I'd ad init system and possibly X server/other GUI system (like wayland), but yah, I think you've covered it.

1

u/Human_by_choice Mar 11 '21

Such an undervalued comment on linux subs. So many people get an answer to why something is better when they ask what it is around here

2

u/Fearless_Process Mar 11 '21

I don't think GCC or Glibc are easily replaceable.

1

u/[deleted] Mar 11 '21

Clang is much better for optimised executables. And musl doesn’t have any speed advantage but is much more easy to understand.

3

u/rldml Mar 11 '21

If you take a sensitive look to your right and left, you'll see mountains of old code nearly every linux based operating system is towing right now.

E.g. X11 for desktop. And yeah, there were several attempts to replace it...

So, basically you're right, but in fact, you're wrong.

8

u/[deleted] Mar 11 '21

How is X11 GNU code?

2

u/rldml Mar 11 '21 edited Mar 11 '21

This is not my point. The point is, it took several years to replace a component like X11 through something different. And it is not done right now, there are many things which don't work as wanted right now. And X11 is just one component, there are many other components for sure you can't replace that "easily".

That's because you can't say, the kernel is a more important part of a Linux-based OS

edit: Yeah, you've said GNU Code, i know. But Linux is not just kernel + GNU, there is a lot of more stuff to consider.

0

u/[deleted] Mar 11 '21

[deleted]

8

u/[deleted] Mar 11 '21

Are you just guessing that it's probably GPL? They use a modified version of the MIT license, which is not so similar to GPL. And even it was, it's not "huge mountains of GNU code", its a license.

4

u/[deleted] Mar 11 '21

The xorg server is MIT licensed and also used by FreeBSD, X11 is being replaced by Wayland (already the default on gnome, usable on KDE ).

1

u/rldml Mar 11 '21

This is not my point. The point is, it took several years to replace a component like X11 through something different. And it is not done right now, there are many things which don't work as wanted right now. And X11 is just one component, there are many others for sure you can't replace that "easily".

That's because you can't say, the kernel is the more important part of a Linux-based OS

4

u/Poddster Mar 11 '21

If you take a sensitive look to your right and left

I see a router running busybox + linux and a phone running Android. ;)

3

u/Sol33t303 Mar 11 '21

The Linux kernel is certainly important, but IMO just as replaceable. We have various kernels already that could potentially replace it, such as the various BSD kernels, maybe potentially HURD (if it ever gets to a ready state) and possibly 1 or 2 others I forget right now.

2

u/Human_by_choice Mar 11 '21

You forgot to mention the NT Kernel! :D

3

u/AiwendilH Mar 11 '21

No need to look for anything "potentially" there...Microsoft did just that with WSL1...a system running on a linux kernel emulation layer that uses a unmodified binary userspace. They removed the linux kernel and kept everything else.

2

u/patatahooligan Mar 11 '21

I don't believe there is a universal definition. Some people will say it's only the kernel. But you could make a case for init, system libraries, the package manager, the GUI, etc.

how does a distribution communicate with the Linux kernel?

I don't understand this question. All binaries can communicate with the linux kernel. The concept of "distribution" has nothing to do with this.

2

u/istarian Mar 11 '21 edited Mar 11 '21

https://en.m.wikipedia.org/wiki/Operating_system

In theory you could have a totally unusable OS simply because no applications are present to allow you to interact with it..

From a more practical perspective it's the absolute minimum bundle of the kernel plus software needed to boot the computer (e.g. boot loader), interact with the system (e.g. CLI shell), and create additional software (e.g. text editor, toolchain to compile, link, etc new C programs).

In common usage, "Linux" or "Windows" implies a particular set of provided software above and beyond the kernel.


The distribution just refers to a particular collection of software.

A Linux distribution that ships with KDE by default is different than one which ships with XFCE, although that's a fairly superficial distinction. SysV Init (Unix) vs systemD is a much more significant difference.

The difference could be as small as one package or as large as a non-GNU set of basic utilities, an entirely different bootloader, etc.

1

u/haxpor Mar 11 '21

To add more things on top, kernel please provides interfaces for developers to build things on that tightly integrated into linux kernel. Those interfaces are header files and library you will be linking to.

I don't think we should pay attention much about .iso or distro released as it is at the packaging level.

Think about almost device drivers (for your wifi adapters, etc) which baked into kernel itself contrasting this with Windows that needs departed drivers to be installed.

Think about how the OS would manage and distribute allocated time slot to execute instructions from multiple processes, kernel manages that and has algorithm to do the work efficiently and fairly.

Once I asked similar question of where is kernel source code although I was already inside terminal, the answer is it's mostly everywhere around :)

1

u/catwok Mar 12 '21

There is a good diagram here that lays the framework around the kernel nicely: https://en.wikipedia.org/wiki/User_space#Implementation

1

u/MitchellMarquez42 Mar 11 '21

The operating system is an illusion. What you see at work when a computer boots is merely a single binary executable calling forth other bits of code to be executed from the disk so that they produce a feedback loop which accepts input from specific sources and which (nowadays) can multi-task, prioritize, and interpret code in the form of text rather than plain binary.

If you want to get technical, though, the kernel is process number 0, init is process number 1, and everything else is handled on-the-fly by those two.

So, you could say that the operating system is anything in /bin and /sbin. These are what get accessed and executed in the background and during normal usage, and are not the kernel.

However, here's a cool thing: if you ever get stuck in the initramfs shell (ie because of a broken init or something), you may notice that it has its own coreutils even though it can't even see the disk. This is because it creates its own directory structure with tiny versions of the coreutils-- basically, it's a mini operating system that boots instantly and has literally no bloat, not even a kernel. This is horrible to live in, though, so operating systems exist.

4

u/Sophira Mar 11 '21

initramfs systems actually do have a kernel - the same kernel your main OS runs.

Typically, after loading the required drivers, those initramfs systems will then use pivot_root(8), switch_root(8), or similar, and then exec the /sbin/init file on your actual disk. Throughout all of this, the same kernel is running.

1

u/rizzzeh Mar 11 '21

There are several operating system running on your PC right now, motherboard's EFI is an operating system, CPUs and GPUs have OSes, even HDDs have thier own OS.

1

u/Anon_Con Mar 11 '21

THE MORE YOU GA NUU

0

u/Peetz0r Mar 11 '21

I'd say the distro (in my case, Fedora) is the OS. They make the .iso file that I download, they are where I go to for support (especially if I'd pay a corporate distro like RHEL).

About the GNU_Linux thing, nah. GNU coreutils is imho not the second most component. Maybe systemd is? Or gnome (or any other DE)? But there isn;t one that really sticks out.

In reality, the name Linux refers to two things. One of them is the kernel, and the other is the entire ecosystem, or the family of distro's. That might not be 'technically correct', but it is what it is. Many of us use this name in this way and have done so for over 20 years.

0

u/FantasticPenguin Mar 11 '21 edited Mar 11 '21

The kernel makes the connection between hardware and drivers, the OS provides the user experience and uses the drivers to talk to the hardware. That is as far as I understand. Correct me if I'm wrong.

Edit: to answer your question better, the OS in the case of, for example Ubuntu, will be GNU.

0

u/SkyyySi Mar 11 '21

Just pointing something out here based on the replies: The reason you shouldn't call it "GNU/Linux" or something like that is because you don't need GNU to use "Linux". You can use it with a busybox userland for instance. Calling it "desktop Linux" isn't really working either, since debian for servers and for desktops is essentially the same OS for example. The term used to refer to an operating system build on Linux with an environment somewhat like, let's say, FreeBSD, is "Linux". Just calling it "Linux" is fine. I think that the more sensical thing is to say "Linux" to the OS and "Linux kernel" when specifically referring to the kernel.

1

u/DFatDuck Mar 12 '21

Calling it specifically GNU/Linux is useful, since as you mentioned, some distributions don't use GNU. All major "Desktop"/"Server" distributions use coreutils.

1

u/SkyyySi Mar 12 '21

I think you son't quiet get what I mean: Calling it "GNU/Linux" only makes sense when it's about an Linux based os with specifically the GNU version of some tools, when you're talking about something tgat requires this specific combination. Which is rarely the case.

1

u/DFatDuck Mar 12 '21

Saying Linux is much more broad than what most people are talking about. It includes Android, cash registers, automotive systems, etc.

All the distributions of Linux which run on PC and Servers are all based on GNU/Linux.

1

u/SkyyySi Mar 12 '21

All the distributions of Linux which run on PC and Servers are all based on GNU/Linux.

Apline and many LFS distros: Allow us to introduce ourselves

Saying Linux is much more broad than what most people are talking about. It includes Android, cash registers, automotive systems, etc.

That's the Linux kernel. That is what I was talking about...

1

u/DFatDuck Mar 12 '21

Apline and many LFS distros: Allow us to introduce ourselves

Alpine uses Busybox. True. But it is not used by many.

That's the Linux kernel. That is what I was talking about...

Yeah, many devices run Linux distributions, but generally only Desktops and Servers run GNU/Linux, and most Linux Desktops/Servers have GNU. It's a really big two way correlation.

-1

u/wsppan Mar 11 '21

Got so tired of answering this question back in the day that I almost switched to FreeBSD, lol!

-2

u/ReceptionSweet383 Mar 11 '21

╰─ man LFS                                                                                                       ─╯
No manual entry for LFS

Whoops.

There is no single 'operating system' here. What we have is a mechano set loosely bolted together - in distributions or (as with Arch) in DIY 'kit' form with differing styles and approaches (see Ubuntu vs Debian, also Redhat, Arch - they can appear vastly different).

0

u/[deleted] Mar 11 '21

[deleted]

1

u/NekoMadeOfWaifus Mar 11 '21

What are some examples of what GNU provides?

1

u/AiwendilH Mar 11 '21

As example in gnu systems: /lib[64]/ld-linux.so. (Part of glibc). That is the "program" which actually runs and links other programs with their libraries. It's referenced in the ELF header of program binaries then called with the program binary as argument then looks up the necessary library files (.so) , loads them in memory if necessary and modifies the function table of the program binary to contain the "real" memory addresses of library functions then. It's almost literally what allows you to run any program on a gnu linux system.

0

u/[deleted] Mar 11 '21

[deleted]

1

u/NekoMadeOfWaifus Mar 11 '21

So it's a concept and not any particular software?