Thanks to visit codestin.com
Credit goes to www.geeksforgeeks.org

Open In App

Boot Process with Systemd in Linux

Last Updated : 13 Nov, 2025
Comments
Improve
Suggest changes
7 Likes
Like
Report

Systemd is the first process (PID 1) started by the Linux kernel that manages system initialization and all services through parallel startup and intelligent dependency management.

Here are some key points:

  • Replaces traditional SysVinit with parallel service startup for faster boot times​.
  • On-demand activation starts services only when needed, saving resources​.
  • Uses targets (graphical.target, multi-user.target) instead of runlevels​.
  • Provides tools like systemctl, journalctl, and systemd-analyze for management​.

Example: Check Boot Time

  • This shows total boot time, useful for identifying if your system boots slowly.

Command:

systemd-analyze time

Output:

Syntax:

systemd-analyze [command]
  • Where [command] is one of the analysis options like time, blame, critical-chain, or plot to analyze different aspects of the boot process.

Analyzing Boot Performance

Here are some systemd-analyze commands:

CommandPurpose
timeShow total boot time
blameList services by startup time
critical-chainShow service dependencies
plotGenerate graphical boot chart

Example 1: View Service Dependencies

Command:

systemd-analyze critical-chain

Output:

processes chain summary
  • It displays the boot sequence timeline, showing which system services took the most time to start after boot.
  • The value after “@” shows when each service started (time since boot began), and the value after “+” shows how long that service took to start.

Example 2: Identify Slow Services

Command:

systemd-analyze blame

Output:

list of services
list of services
  • The command lists all system services and their startup times in descending order - showing which ones delayed the boot process the most.
  • The time on the left indicates how long each service took to start (e.g., 5.163s phpsessionclean.service means PHP session cleanup took 5.1 seconds).
  • It helps administrators identify slow or problematic services during system boot so they can optimize or disable unnecessary ones.

Example 3: Generate Visual Chart

Command:

systemd-analyze plot > boot.svg

Output:

plot > boot.svg
plot > boot.svg
  • This will create a file called boot.svg containing a graphical representation of the boot process as : 
boot.svg image , plotted with time vs process
boot.svg image, plotted with time vs process
  • The command generates a graphical boot timeline that visually displays how long each system service or device took to start during boot.
  • Each horizontal red bar represents the startup duration of a specific unit ( like dev-sda1.device or systemd-journald.service ). Longer bars indicate services that delayed the boot process.
  • It helps administrators identify performance bottlenecks and understand which services or hardware components contribute most to the overall boot time

Linux Boot Process Stages

Here are stages for linux boot process:

StageDescription
BIOS/UEFIPower-On Self Test (POST) checks hardware (CPU, RAM, disk)
Boot LoaderGRUB2 loads from MBR, provides menu to select OS/kernel
KernelKernel initializes hardware, mounts root filesystem, runs/sbin/init
SystemdKernel starts systemd (PID 1), which initializes all services
  • Systemd revolutionized Linux boot processes through parallel service startup and comprehensive management tools.
  • The systemd-analyze command helps administrators measure performance and identify bottlenecks.
  • Despite controversy, systemd has become the standard for modern Linux distributions.

Explore