Let's begin with the most basic explanation of what Linux is:

Linux is an operating system

Actually, let's amend that:

Linux is a kernel, which put together with software from GNU and BSD and lots of other places, makes up an operating system

OK, great! We're done here, pack up and lets go home!

Just kidding... While those statements are factual, they don't explain much.

So what is an operating system?

An Operating System (we will shorthand it by saying OS) is the software that lets a computer run other software. It bridges the gap between the complicated guts of computers (processors! memory! hard disks! mouse! keyboard! video card!) and programs that need to run on many different kinds of hardware.

For example, it would be really frustrating if you could only run your favorite game on computers with AMD-brand processors and exactly 2 gigabytes of Crucial-brand RAM and only Western Digital SATA-type hard drives. Or if your word processor would only work on a desktop computer and not on a laptop. Since each computer is made of different parts from different manufacturers (which lets you have a lot of flexibility in price, size, speed, etc) we need to have common ground language for talking to all the physical hardware bits that make up your desktop or laptop.

That common ground/language is called the Operating System

Operating systems you may have heard of!

  • Microsoft Windows 7 - and its little/big brothers 3.1, 95, NT, 98, XP, Media Edition, 8, 10
  • Pocket PC / Microsoft Windows Mobile - the lightweight mobile/phone versions of Windows
  • Mac OS X - and previous versions like Mac OS 9, System 7, etc.
  • iOS - Apple's mobile/phone/tablet operating system
  • Unix, BSD, NeXT, Linux, Solaris, etc. - the huge number of Unix-like operating systems
  • There're tons more you can read about on Wikipedia

Each one of these was developed by a group or company to talk to hardware in the way that group thought best. In general (but not always) - software written for one Operating System will not run on another operating system. You cannot run a Windows program on iOS (emulators are an exception)

What is in an Operating System?

Modern operating systems contain a lot of software, but they’re usually all built around something called a kernel, which is the core piece of code in charge of managing all that hardware, things like processors, memory, hard disk drives, and network interfaces like Ethernet or WiFi.

A kernel starts programs and controls the way that they share hardware resources, coordinates driver code for different kinds of hardware, and makes it possible for software (like your spreadsheet) to work without itself knowing the detailed specifics of hardware (like which brand of monitor you are displaying the spreadsheet on).

Kernels vs "Bare Metal"

If you’ve worked with tools like Arduino or Propeller or PIC or other microprocessors, you’ve probably written programs that run right on the “bare metal” of a microcontroller. In general, when your code says something like this:

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
  delay(1000);             // wait for a second
  digitalWrite(led, LOW);  // turn the LED off by making the voltage LOW
  delay(1000);             // wait for a second

…then the code in your loop is the only thing running, happily blinking that LED 'til the end of time (or the end of your battery life, at any rate).  You could think of things as fitting together like this:

Other than the Arduino IDE and the compiler, there's nothing in the way of your commands and the computer/microprocessor.

For lots of simple projects, this is a great approach: The hardware is low-cost and runs for ages without much power. The code is simple and can get right down to business without waiting for a lot of complicated stuff to boot up first.

So Why an Operating System?

So what happens when a device needs to do a lot of things at once — stuff like storing lots of data, communicating across complex networks, and interacting with multiple users? What if you want to be able to switch between different programs, or run the same program on very different kinds of hardware? What if the users of your hardware want to be able to reprogram it on the fly?

These are the problems that led the builders and users of early computers to write operating systems.  What they came up with looks a little more like this:

The kernel of a modern OS is a little bit like that loop() function, if you wrote it to enable all of the stuff that you might want to do with a general purpose computer. However, instead of just turning on/off an LED, it goes around to every single program and takes requests for what the program wants.

That turns out to be a lot of stuff.

For example, this morning my kernel asked
"Hey MyPaint, whatcha need?"
and MyPaint replied
"Hey can you draw some red pixels over here on the monitor"
and the kernel commands the video driver to do that.
Then it went over to the IM client and said
"Hey IM client, whatcha need?"
and the IM client said
"Hey I also need you to draw to the montor, this little notice that a new message came in AND also can you play a ding-tone on the speaker?"
and the kernel replied and said "no problem" and told the sound driver and video card to do those things. The more programs running at once, the more the OS/Kernel has to chat to each one, asking what it wants and doing those tasks.

Note that some times, the kernel/operating system cannot handle or do the request! That's when you get program crashes, blue-screens-of-death, error boxes, etc. MyPaint may say "Cool time to save this image file, please save it to disk!" and the OS will reply "Sorry! No more disk space!"

Shmuel Csaba Otto Traian CC BY-SA 3.0, via Wikimedia Commons

OK, so now you know what an Operating System is. Linux is one member of a huge family of operating systems descended from something called Unix.

Linux-based OSes serve the same essential purpose as Microsoft’s Windows or Apple’s OS X (also a Unix-derivative!), but it’s a very different animal in some important ways. For one thing, its code is freely available to everyone. For another, there is no single, “official” form of the Linux operating system. Instead, many groups offer versions for different needs and purposes.

They may not be directly visible, but you probably use lots of computers running Linux, or at least the Linux kernel. That’s because it runs on millions of the machines that make up our networks and infrastructure: Systems ranging from tiny embedded devices to enormous supercomputers used for scientific work, and nearly everything in-between.

For example, here're some common products/devices that run Linux:

There’s a pretty good chance you already have a Linux machine or two in your house — or your pocket.

This guide was first published on Dec 24, 2014. It was last updated on Nov 22, 2014.

This page (Linux is an operating system) was last updated on Nov 22, 2014.

Text editor powered by tinymce.