12

Why do people refer to Linux as a kernel rather than an operating system? To the best of my knowledge, the kernel is one part of the operating system.

Chris Down
  • 125,559
  • 25
  • 270
  • 266
user2720323
  • 3,589

5 Answers5

36

A linux system is built out of many different parts.

The central part is the linux kernel. (You can get it from kernel.org, it is originally written by Linus Torvalds who named it "Linux".)

The kernel by itself is pretty much useless. It manages all kind of hardware and provides an interface for applications to use. To make any use of it you therefore need applications using this kernel.

On the other hand there is the GNU project, initiated by Richard Stallman. Its mission is to create a complete free operating system with all the standard tools around it.

After several years the GNU project went well, they wrote all the standard tools, but they still were missing a working kernel.

So it happened that at the same time there was a project for a kernel without tools (Linux), and a project with all the tools but without a kernel (GNU). As both were written with the same UNIX mindset it was possible to combine them into a full operating system which people aptly called "GNU/Linux".

But even this kind of bare "GNU/Linux" system is not very useful without the software you want to run on it. (Like a browser, a mail server, or anything like this.)

Therefore some distributions (like Debian, RedHat, SuSE, Arch, etc.) went to package a Linux kernel, the GNU tools, and all kind of applications together for easy installation and maintenance. (There are also distributions which use other kernels. For example you can have a Debian system with FreeBSD or GNU-Hurd as a kernel.)

Now for "normal" people, (who for example just want to have a running web browser) this background is much too detailed and they want just a single name for it. So most of the time someone claims he installed "Linux" he usually really installed some distribution which came with a Linux kernel as one part of many.

To cut a long story short, people often just use the name of the central kernel to refer to the whole system.

It is for you to decide what you call an "operating system". Is it just the thing that manages hardware (like Linux) or is it the thing you interact with (like your favorite desktop environment), or maybe something in between like a basic (command line based) GNU/Linux.

michas
  • 21,510
11

A kernel is a constituent part of a larger operating system -- usually, in Linux distributions, the larger operating system contains a base of GNU tools, which is why many people refer to the kernel as Linux, and the overall operating system as "GNU/Linux" (although many people don't make this distinction).

People call Linux an operating system because they have to choose a name to refer to the overall operating system that is provided by the sum of parts. Linux is the lowest level component that is readily visible to the user, so it is natural that it would take on this name and role. People don't usually refer to GNU grep as "GNU grep", they usually just call it "grep" -- to many users, GNU tools are not as visibly tied together as the Linux kernel.

Richard Stallman is very insistent about having people call Linux "GNU/Linux", since it contains many GNU tools (the C compiler perhaps being the most critical). I'm not so fussed, and not many other people are, either.

If you want clarity, GNU/Linux unambiguously refers to the operating system (rather than the kernel). "Linux" is significantly more ambiguous out of context.

Chris Down
  • 125,559
  • 25
  • 270
  • 266
  • The OS in case of Linux would be its various flavors available, like Fedora, Red Hat, Solaris etc. All of these flavors are based on the same kernel i.e. Linux. – debal Oct 10 '13 at 06:06
  • @debal they are also based on the same GNU tools so GNU/Linux would also work. – StrongBad Oct 10 '13 at 07:10
  • 6
    Solaris is not a Linux distro - it is an OS in its own right, with its own kernel. – D_Bye Oct 10 '13 at 07:10
  • @D_Bye You should probably mention (with @) debal in that comment so that he can respond. – Chris Down Oct 10 '13 at 07:11
  • I'll give you a hand D_Bye and Chris @debal :) – user Oct 10 '13 at 07:17
  • @MichaelKjörling I was going to do it, but you can't mention more than two people in a comment (it refuses to let you post) :-( – Chris Down Oct 10 '13 at 07:53
  • @ChrisDown I know, and that's really a shame sometimes. Every once in a while it'd be really useful. – user Oct 10 '13 at 07:56
  • @D_Bye sorry i've mentioned that by mistake. Now that you mentioned it, I kind of feel stupid.. :) Thanks for pointing that out, and also the part where they use the same GNU tools. – debal Oct 10 '13 at 08:00
  • 1
    I would not say it is called Gnu/Linux because of tools like gcc but because most of the POSIX APIs, i.e. what makes an OS a Unix is provided in the Linux case by Gnu software. These pieces are mainly libraries like the glibc and core utilities (shell and basic commands). On the other hand, the C compiler is not at all required or even AFAIK specified by the standard. – jlliagre Oct 10 '13 at 14:39
  • Well, it's trivial enough to not use coreutils, and not use GNU utilities. I run Arch Linux and have almost entirely replaced GNU coreutils with 9base. Relieving gcc has historically been more difficult (although nowadays, many compilers can do it). – Chris Down Oct 10 '13 at 16:08
1

To the best of my knowledge, the kernel is one part of the operating system.

The kernel is the "core" of the operating system. It provides most of the critical services. Starting, terminating and scheduling of processes, allocation of memory and swap space to processes, inter-process communication, files, the lower levels of the network stack, some level of IO abstraction.

On top of the kernel, we build a stack of other components. On the one hand, the kernel is not much use without at least some of those other components. On the other hand few of these components are truly mandatory, and most can be replaced with something else.

Exactly which of those components should be counted as part of the "operating system", is thus not clear-cut.

Why do people refer to Linux as a kernel rather than an operating system?

Two reasons.

The first is that strictly speaking it's true. The project called "Linux" only maintains a kernel. It is up to third party distributors to put together a collection of other software to actually turn it into a useful system.

The second is that the Free software foundation are somewhat annoyed that Linux gets all the glory. Especially as Linus is a Free software pragmatist not an idealist.

The GNU project was set up by the FSF to create a free software replacement for Unix. They created replacements for many important components, like the compiler, binutils (assembler, linker etc) libc (provides both the C standard library and the wrappers that turn the kernel's system call interface into posix), textutils, shellutils and fileutils (now merged as coreutils).

However they struggled to make a replacement for the Unix kernel. In 1987 Stallman decided to go with a system based on the Mach microkernel and a collection of Daemons known as Hurd. However the project was delayed starting by 3 years due to licensing concerns and has had a moribund development history ever since.

Meanwhile a student called Linus wrote his own kernel inspired by MINIX. A kernel alone doesn't make an OS, so GNU components were ported to the new kernel. Within a few months the kernel was sufficiently advanced and sufficient software had been ported to make the system "self-hosting", that is it was possible to build Linux on Linux. Soon after that Linux adapted the GPL and rapidly started to gain momentum.

For better or worse the term Linux came to be used to describe not just the kernel, but the system as a whole. This annoyed the FSF who saw the kernel as just one component among many. From their perspective they saw their project essentially co-opted.

plugwash
  • 4,352
0

Linux is itself is a kernel. It can be configured to a network workstation, a DNS server, a DHCP server, a web server, a mail server, a file and print server, database server, a firewall, a gateway router and many more. Kernel makes memory management, device management and system calls efficient Linux torvald created kernel. Richard stallman in return decide to build a free os. They were lacking kernel. Then, GNU/Linux was born. Linux is not about just torvald.

-1

Linux is a kernel. That is the main reason to call it a kernel. Ubuntu, Android and Chrome OS are fundamentally different operating systems. Applications for Ubuntu do not necessarily run on Android just like they do not necessarily run on Windows. For one simple reason: The operating system is different. Linux based operating systems also strongly differ from a security point of view. Chrome OS is known to be very secure. Android is not that secure: http://www.forbes.com/sites/gordonkelly/2014/03/24/report-97-of-mobile-malware-is-on-android-this-is-the-easy-way-you-stay-safe/

Daan
  • 109