# Kernel

URL: https://softwaredictionary.org/terms/kernel
Category: Operating Systems
Last updated: 2026-09-30
In Turkish: çekirdek

In short: A kernel is the core part of an operating system that manages the CPU, memory, and hardware devices and controls how programs get access to those resources.

## What is an operating system kernel?

The kernel is the central program of an operating system and one of the first things loaded when a computer boots. It stays in memory the whole time the machine runs and acts as the bridge between applications and hardware, deciding which program gets the CPU, how memory is divided, and how data moves to and from disks, networks, and other devices.

The kernel runs in a privileged CPU mode called kernel mode, where it can execute any instruction and access any memory. Regular applications run in a restricted user mode and must ask the kernel for help through system calls whenever they need to read a file, open a network connection, or start a new process. This separation protects the system, because a buggy application cannot directly damage the hardware or other programs' memory.

A good analogy is the front desk of a busy hotel. Guests (programs) cannot walk into the boiler room or make their own room keys; they ask the front desk, which checks permissions and handles the request safely. Well-known kernels include Linux, the Windows NT kernel, and XNU, the kernel behind macOS and iOS.

People often mix up the kernel with the whole operating system or with the shell. The operating system includes the kernel plus tools, libraries, and user interfaces, while the shell is just a program that takes your commands and asks the kernel to carry them out. Kernel designs also differ: monolithic kernels such as Linux run most services in kernel mode, while microkernels keep only the essentials there and move drivers and other services into user space.

## Key takeaways

- The kernel is the core of the operating system and runs the entire time the computer is on.
- It manages the CPU, memory, devices, and file systems.
- The kernel runs in privileged kernel mode; applications run in restricted user mode.
- Applications request kernel services through system calls.
- Common designs include monolithic kernels and microkernels.

## Example: Inspecting the running kernel on Linux

```bash
# Print the name and version of the running kernel
uname -sr

# Show the most recent kernel log messages (may require sudo)
sudo dmesg | tail -n 5

# List a few kernel modules (such as drivers) currently loaded
lsmod | head -n 5
```

## Frequently asked questions

**Is Linux an operating system or a kernel?**

Strictly speaking, Linux is a kernel. Complete operating systems built on it, called Linux distributions, combine the kernel with system tools, libraries, and package managers.

**What is the difference between kernel mode and user mode?**

Kernel mode is a privileged CPU mode where code can access all hardware and memory, and it is reserved for the kernel. User mode is restricted, so applications must use system calls to ask the kernel to perform privileged actions for them.

**What is a kernel panic?**

A kernel panic is a fatal error that the kernel cannot safely recover from, so it halts the system to prevent data corruption. On Windows the equivalent is usually called a stop error or blue screen.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
