# Daemon

> A program that runs in the background all the time. It has no window.

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** Linux Daemon, Background Service, Service (Linux)

## Think of it like

Think of it like a night guard. Nobody sees him, but he is on duty all the time.

## Definition

A daemon is a program that runs in the background with no window. It starts when the machine boots and keeps running. It waits for work, like a web request or a login. Many daemon names end in d, like sshd or crond. On most Linux systems, systemd starts and watches them.

## Example

Emma's server runs sshd, the SSH daemon. It waits all day for someone to log in.

## Example code

```console
$ ps -C cron
    PID TTY          TIME CMD
    845 ?        00:00:00 cron
```

The ? under TTY means the program has no terminal. It runs in the background.

## Why it matters

Every server job, from web pages to logins, is a daemon. Fixing a server often means fixing one.

## Common mistake

Starting a server program in a terminal and closing it. The program dies with the window, so make it a daemon.

## Three principles

- **No window.** Runs in the background.
- **Starts at boot.** And keeps running.
- **Waits for work.** Answers when asked.

## Related terms

- [systemd](https://learn.benibix.com/term/infrastructure/systemd)
- [journalctl](https://learn.benibix.com/term/infrastructure/journalctl)
- [Cron](https://learn.benibix.com/term/infrastructure/cron)
- [Process](https://learn.benibix.com/term/development/process)

## Taught in

- [systemd and Daemons](https://learn.benibix.com/learn/infrastructure-linux/systemd-and-daemons): Linux CLI, 8/10

![systemd at the top, marked process number 1, starts and restarts three daemons below it: nginx, sshd and cron. All three daemons write lines into a journal at the bottom, and journalctl reads them back.](https://learn.benibix.com/diagrams/inf3-services.svg)

---

Source: https://learn.benibix.com/term/infrastructure/daemon
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
