What Is an Operating System?
An operating system (OS) is the software that manages a computer's hardware and runs every other program, sharing the processor, memory and storage between them and giving them files, networking, input and output. Windows, macOS, Linux, Android and iOS are operating systems.
Updated September 24, 2026
Press a key while a text editor is open. The keyboard sends an electrical signal, and a driver inside the operating system reads it. The operating system works out which window is in front, delivers the key to that program, and the editor draws the letter. The editor never talks to the keyboard at all. Saving the file, playing a sound and loading a web page work the same way: programs ask, and the operating system does the work with the hardware.
What an operating system does
An operating system has a handful of jobs, and every program on the computer depends on all of them:
- Running programs (process management). A laptop with 8 CPU cores can have a few hundred programs and background services running. The OS scheduler gives each one short turns on a core, switching many times per second, so they all appear to run at once.
- Managing memory. Each program gets its own private address space. When a program reads memory that does not belong to it, the OS stops it; in C this is the famous segmentation fault.
- Storing files. The OS turns a disk, which only stores numbered blocks of bytes, into folders and named files, a textbook case of abstraction. The format is called a file system: NTFS on Windows, APFS on macOS, ext4 on most Linux systems.
- Talking to hardware. Drivers translate between the OS and each device: graphics card, Wi-Fi chip, printer, webcam.
- Networking. The OS implements TCP/IP, so a program can open a connection to a server without knowing anything about the network card.
- Security and users. Accounts, passwords and file permissions decide who can read or change what.
- The user interface. The desktop, windows and taskbar, or a text shell such as Bash or PowerShell.
The kernel and system calls
The core of an operating system is the kernel. It runs with full control of the hardware, while ordinary programs run in a restricted mode and cannot touch devices directly. When a program needs something, it makes a system call: a request to the kernel such as "open this file", "send these bytes" or "start a new process".
Most of the time you do not see system calls because your language wraps them. Python's open() and print() end in calls to the kernel. The os module lets you make them almost directly:
The process ID and core count depend on the machine; the last line always prints File size: 23 bytes. os.open returns a file descriptor, a small number the kernel uses to track the open file, and os.write sends 23 bytes to it. In C the same requests look nearly identical, because these functions are thin wrappers over the system calls:
int fd = open("note.txt", O_WRONLY | O_CREAT | O_TRUNC, 0644);
write(fd, "saved by a system call\n", 23);
close(fd);
On Linux you can watch every system call a program makes with strace python3 script.py.
Examples and types of operating systems
| Operating system | Where it runs | Kernel |
|---|---|---|
| Windows 11 | Most desktop and laptop PCs | Windows NT |
| macOS | Apple Mac computers | XNU (Darwin) |
| Linux (Ubuntu, Fedora, Debian and others) | Most servers and cloud machines, some desktops | Linux |
| Android | Most smartphones worldwide | Linux |
| iOS | iPhone | XNU (Darwin) |
| ChromeOS | Chromebooks | Linux |
Besides these general-purpose systems there are real-time operating systems such as FreeRTOS and Zephyr, which run on microcontrollers in appliances, sensors and industrial machines and guarantee a response within a fixed time. Many small devices run embedded systems built for a single purpose.
The table shows that one kernel can power very different products. Android and ChromeOS both use the Linux kernel with their own software on top, and iOS shares its kernel with macOS.
Why the operating system matters when you program
A compiled program is built for one operating system. A Windows .exe does not run natively on Linux, even on the same computer, because the file format and the system calls are different. That is why download pages offer separate versions, and why runtime environments such as the JVM, Node.js and CPython exist: they are built once per operating system so your code does not have to be. See runtime environment.
Small differences leak through anyway. Run this and compare with a friend on another system:
On Linux and macOS it prints:
Path separator: '/'
Line ending: '\n'
projects/notes/todo.txt
On Windows the separator is '\\' (a single backslash), the line ending is '\r\n', and the path becomes projects\notes\todo.txt. Using os.path.join (or pathlib) instead of typing / by hand is what keeps a script working on all three.
Common misconceptions
- "Linux is an operating system." Strictly, Linux is a kernel. A Linux distribution such as Ubuntu adds the shell, system tools, a package manager and usually a desktop to make a complete operating system. In everyday speech both are called Linux.
- "The BIOS is part of the operating system." The BIOS or UEFI firmware lives on the motherboard. It checks the hardware and then loads the operating system from disk, and then its main job is done.
- "The desktop is the operating system." The desktop is one program on top of the kernel. Servers usually run with no desktop at all, controlled only through a text shell.
- "Apps talk to the hardware." Ordinary programs are not allowed to. Every file read, network packet and pixel on screen passes through the operating system, which is why a crashing app does not normally take the whole computer down with it.
Where to go next
The operating system is the bottom layer; the runtime environment sits between it and your code. Memory protection is what produces a segmentation fault, and the byte page explains the unit the OS uses for files and memory. To control an operating system from its text shell, try the terminal course.
Frequently Asked Questions
Can a computer run without an operating system?
What are the 5 most common operating systems?
What are the main types of operating systems?
How do I check which operating system I have?
winver. On a Mac, open the Apple menu and choose About This Mac. On Linux, run cat /etc/os-release in a terminal, and uname -r shows the kernel version.