Master Linux Startup: rc.local, init.d, and systemd Explained
This article explains three common Linux startup methods—traditional /etc/rc.local, legacy SysVinit scripts in /etc/init.d/, and the modern systemd unit system—detailing their roles, execution contexts, and how systemd has largely replaced older approaches.
In Linux there are several ways to run scripts after the system boots. Below are the most common methods.
/etc/rc.local
/etc/rc.localis the traditional init script used before systemd. It is a shell script executed at the end of the boot process with root privileges, allowing custom commands or services.
It provides a simple way to customize the system or start background processes.
With the adoption of systemd, many distributions have deprecated /etc/rc.local in favor of systemd’s native mechanisms.
/etc/init.d/
/etc/init.d/is a directory that historically stored SysVinit scripts, which are shell scripts for starting, stopping, or managing services.
SysVinit uses runlevels; scripts placed in /etc/init.d/ correspond to these levels, e.g., /etc/init.d/apache2 manages the Apache web server.
Although some legacy distributions still use SysVinit for compatibility, most modern Linux distributions default to systemd.
systemd
systemd is a modern init system and service manager that has replaced SysVinit in many Linux distributions, offering parallel service startup, socket activation, logging, and dependency tracking.
Instead of separate init scripts, systemd uses unit files (declarative configuration) stored in /usr/lib/systemd/system/ or /etc/systemd/system/ with a .service extension.
systemd also introduces “targets” as replacements for runlevels, grouping units to define overall system states such as multi-user.target or graphical.target.
Overall, systemd provides improved service management, faster parallel startup, better logging, and a simpler initialization approach compared to traditional init systems.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
