systemctl

Reference manpage: man systemctl

Systemd has emerged as the de-facto primary init system for the vast majority of mainstream Linux distributions today. To manage services and other systemd units, systemctl is your go-to tool.

Listing Units You can list all active and loaded systemd units (services, sockets, devices, mounts, etc.)

systemctl list-units

To see all unit files, including those not currently loaded or enabled

systemctl list-unit-files

Checking Status To inspect the status of a specific service, including its dependencies, logs, and current state

systemctl status <service_name>

Starting/Stopping/Restarting

systemctl start <service_name>
systemctl stop <service_name>
systemctl restart <service_name>

Enabling/Disabling To configure a service to start automatically at boot (or prevent it from doing so)

systemctl enable <service_name>
systemctl disable <service_name>

Enabling/Disabling and Starting/Stopping in one step

systemctl enable --now <service_name>
systemctl disable --now <service_name>

Inspecting Dependencies systemctl can also show you the dependency tree for a service

systemctl list-dependencies <service_name>