GardenCloud & systems

Linux service state and boot-time enablement

A short reference separating running a service now from configuring whether it starts on boot.

Starting a service now and enabling it for boot are different state changes. The earlier note compared the service interface:

sudo service <service_name> start|stop|restart

Ex
sudo service nginx start

with systemd service control:

sudo systemctl start|stop|restart <service_name>

Ex
sudo systemctl start nginx

and boot-time enablement:

sudo systemctl enable|disable <service_name>

Ex
sudo systemctl disable apache2

The vertical bars in these listings mean choose one operation; they are not shell pipelines to paste literally. Enabling a service does not by itself prove it is currently running, and disabling boot startup does not necessarily stop an existing process.

The examples are historical command references. No services were started, stopped, enabled, or disabled for this revision.

← Back to the garden