Skip to main content
⚡ OpenDevDocs
Linux
linuxlinuxCore ConceptIntermediate

Linux Background Services & Daemons

Understand Linux background services, daemons, PID files, socket activation, and service management lifecycles.

Verified: 2026-09-30
Tested on:linux Ubuntu 24.04 / Debian 12
Platforms:
linux
#linux#services#daemons#devops#administration

What is a Service / Daemon?

A Service (or Daemon) is a background process that runs continuously without direct user interaction to handle system tasks, listen for incoming network connections, or execute scheduled jobs.

By convention, Linux daemons often end with the letter d (e.g. sshd, systemd, dockerd, crond, httpd).


Interactive Process vs System Service

AttributeInteractive User ProcessSystem Daemon / Service
TriggerLaunched manually by a logged-in userStarted automatically at boot by the init system
TTY / TerminalBound to standard terminal (pts/0)Detached from any terminal (?)
TerminationCloses when user logs out or closes terminalContinues running persistently in background
RestartsRequires manual restart upon crashInit system (systemd) automatically restarts upon failure

Service Lifecycle States

[ Disabled / Stopped ]
         │
         ├── `systemctl start <service>`
         ▼
    [ Running ] ──(Crash / Error)──> [ Failed ] ──(Auto-Restart)──> [ Running ]
         │
         ├── `systemctl stop <service>`
         ▼
    [ Inactive ]

Managing Daemons in Modern Linux

On modern Linux distributions, services are managed by systemd. You interact with system services using the systemctl CLI utility to start, stop, reload, enable (auto-boot), or inspect service health.

On this page