Introduction to the Raspberry Pi
Raspberry Pi operating systems
As I mentioned in a previous lecture the Raspberry Pi, unlike the Arduino, requires an operating system to be able to do anything useful with it.
After all they're Raspberry Pi is a computer, is just miniaturized, a very small computer.
So the operating system on any computer is what makes it possible for our applications to utilize the hardware of the computer itself.
In this lesson, you will learn about some of the operating systems that you can use in the Raspberry Pi.
You can watch the video, or, if you are the "reading" type, you can read the text below.
What is the "operating system"?
As the end user of a computer, we use a program, like a web browser or a word processor to carry out some work. If we happen to have programming skills, we can write such programs ourselves.
In the early days of computing, our programs would interact directly with the hardware. For example, to do a simple calculation, we would write instructions that would store values in specific memory locations, and use other instructions to trigger arithmetic calculations between the values that we previously stored in these specific memory locations.
As the computer hardware and programs became more complex, this direct approach became impossible to handle. Computer scientists and engineers created an abstraction layer. A software layer above the hardware that allows programmers to write programs more efficiently, without having to worry about the details of the hardware.
The abstraction layer is the operating system and the compiler software that we use to "translate" a program written in a high-level language (like C or Python) into something that the computer can understand natively.
In fact, specific types of computers, like microcontrollers, just like the very first computers, don't use an operating system, though they do use a compiler. While our programs run directly on the hardware, we can still handle the complexity because the microcontroller hardware is simple compared to that of a computer, and also because of the programming tools (the IDE and the compiler, in particular).
With a modern computer, from a high-level perspective, this is what happens:
- We write a program in a language like C or Python.
- We compile the program into a language that the operating system can understand.
- Our compiled program interacts with the operating system
- The operating system executes our compiled program and gives access to computer resources such as the file system, the GPIOs, the screen, etc.
Without an operating system the Raspberry Pi is just paperweight.
Over the last few years, as the Raspberry Pi went through its iterations from the original Raspberry Pi 1 to Raspberry Pi 2 to the current version Raspberry Pi 3 and it became more powerful, more and more operating systems started becoming available for the Raspberry Pi.
When you go to the Raspberry Pi downloads page, you'll see that there are many operating systems available. There are also many third party websites from where you can download many more customised and specialist operating systems for the Raspberry Pi. You can find one of many growing lists here.
The operating system that the Raspberry Pi Foundation supports and keeps current and looks after is Raspbian.
There's also a version of the Raspberry Pi operating system that you can install on your computer, a Mac or PC computer. With this version of Raspbian, you can get the same educational applications programming languages and so on that are available on Raspbian for the Raspberry Pi, but for your computer; and you don't even need a Raspberry Pi!
I also want to mention NOOBS.
NOOBS is an operating system installer for the Raspberry Pi.
It is designed for people that are absolutely new to the Raspberry Pi and don't want to deal with the nuances of actually "burning" an operating system image on an SD card. The process of "burning" the OS on an SD card is straight forward, as you will learn later in this series of articles, but it can still be overwhelming for many people.
The NOOBs operating system is typically delivered on an SD card when you purchase a new Raspberry Pi. Or, you can download it and "burn" it to an SD card (more about this later).
With NOOBS, the user only needs to connect their Raspberry Pi to a screen and a keyboard, and power it up. NOOBS is will boot.
Through NOOBS, you can choose which of several operating systems you would like to use, and then NOOBS will go fetch the necessary files and install that operating system on the same SD card.
Through NOOBS, you can avoid having to burn the image of your selected operating system on the SD card and then to configure it.
Of course, this is useful if you have NOOBS installed on the SD card that comes with a newly purchased Raspberry Pi.
If you don't have it then you can still download it from here and burn it yourself on an SD card but that defeats the purpose.
In that case, I think that you are better off to just go and install Raspbian which is what you will learn how to do later in this series.
Other operating systems
Apart from Raspbian, there are other operating systems available.
Examples of alternative OSs include Ubuntu MATE, Snappy Ubuntu Core, and Windows 10 IoT Core.
Ubuntu MATE, is a flavor of the actual full Ubuntu MATE operating system which is very popular among Linux users. This makes the exact same setup of a desktop Linux computer available on your Raspberry Pi 3.
Ubuntu MATE is a full operating system in terms of the computing resources is needs, so you will need at least a Raspberry Pi 3 whereas. On the other hand, the Raspbian operating system can run it on earlier Raspberry Pis, like the Raspberry Pi 2.
All of these operating systems emphasize a particular attributes and uses.
For example, the Windows 10 IoT Core OS is optimized around the use of the Microsoft Windows IoT infrastructure from your Raspberry Pi.
Depending on what your objectives are, you can choose an operating system to match those objectives.
In the first version of Raspberry Pi Full Stack that I released in 2015, I used Minibian instead of Raspbian. I did this because, back then, there was no "lite" version of Raspbian (hold on to that thought, I'm going to explain what the "lite" version is).
At that time, I decided to use Minibian because it was the smallest possible version of Raspbian that I could find. Raspbian Lite did now, yet, exist.
Because I wanted to build a minimal web application stack on my Raspberry Pi, I was looking for the smallest possible footprint version of Raspbian, i.e. an operating system that could fit in a small capacity SD card.
And Minibian was that version.
What is a "minimal OS"?
A minimal operating system is an operating system that contains only the absolutely necessary components to achieve a specific mission.
In the case of Raspbian, the full version comes with a lot of components that are not really necessary when we just want to build a web application. For example, features like the graphical user interface, email and browser applications, word processors and games are useless if you want to setup a web server.
By using the full version of the operating system we are wasting a lot of space that can be better used for things such as logging and database files.
Minibian threw away all of the components in Raspbian that were not useful, in particular the graphical user interface, and much more, and only kept the bare minimal.
From the bare minimal end users are free to build it up by installing the absolutely necessary components for their web application and the web application stack, and nothing else.
So that's why back in 2015 I decided to use Minibian.
Fast forward a few years and the Raspberry Pi Foundation finally releases a minimal version of Raspbian: Raspbian Lite.
Raspbian Lite is the equivalent of Minibian from a few years ago.
The difference between Raspbian Stretch Lite and Raspbian Stretch Desktop is that the Lite version doesn't have any of the applications and the graphical user interface component that are unnecessary for an operating system that is meant to be executed and to be used on the desktop.
All of those components are thrown out, and only the absolutely necessary is kept.
And on that we can build with a components that we need for a web application.
So that is why for this guide and course I am using Raspbian Stretch Lite.
We still get Debian Linux under the hood with all the necessary infrastructure that will allow us to build on.
"Raspberry Pi Getting Started" series
Ready for some serious learning?
Start right now with Raspberry Pi Full Stack - Raspbian
This is our most popular Raspberry Pi course.
This course is a hands-on project designed to teach you how to build an Internet-of-Things application based on the world’s most popular embedded computer.
Learn how to:
- Setup your Raspberry Pi as a web server using a minimal version of the Raspbian OS.
- Use only the console to interact with your PRi.
- Setup Python in a container dedicated to your web application, install the necessary modules to control the GPIOs and sensors.
- Build the web application, one level of the stack at a time, using high-performance open-source software.
Jump to another article in this series.
4: Headless and graphical (GUI) operating systems (coming soon)
6: SSH and headless configuration (coming soon)
7: Booting for the first time (coming soon)
8: Connect to your Raspberry Pi using the terminal (coming soon)
9: Header and pins (coming soon)
10: A taste of Python on the Raspberry Pi (coming soon)
11: A simple Python program (coming soon)
12: A simple circuit (coming soon)