Controlling services on Linux keeps maintenance predictable during configuration changes, upgrades, and incident response. Reliable start, stop, restart, and reload actions reduce downtime and make recovery steps repeatable.
Most modern distributions run background processes as systemd units, and systemctl communicates with the systemd manager to control them. Service units are commonly named name.service, with unit files typically stored under /usr/lib/systemd/system (distribution packages) and /etc/systemd/system (local overrides and custom units).
Reloading is preferred when a daemon supports it because configuration is re-read without a full process teardown, but many units do not implement reload. Restarting interrupts active work and can disconnect clients, so validating the unit state and recent logs before and after changes helps prevent avoidable outages.
$ systemctl list-unit-files --type=service | head -n 8 UNIT FILE STATE PRESET apt-daily-upgrade.service static - apt-daily.service static - autovt@.service alias - console-getty.service enabled-runtime disabled container-getty@.service static - cryptdisks-early.service masked enabled cryptdisks.service masked enabled
systemctl accepts both service-name and service-name.service.
$ sudo systemctl status --no-pager --full ssh.service | head -n 14
* ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-01-11 21:40:20 UTC; 37s ago
TriggeredBy: * ssh.socket
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 1292 (sshd)
Tasks: 1 (limit: 14999)
Memory: 1.2M (peak: 2.9M)
CPU: 21ms
CGroup: /system.slice/ssh.service
`-1292 \"sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups\"
Jan 11 21:40:20 host.example.net systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
The bottom section shows recent log lines for the unit.
$ sudo systemctl start ssh.service
$ sudo systemctl stop ssh.service Stopping 'ssh.service', but its triggering units are still active: ssh.socket
Stopping a shared dependency can take down other services that require it. Socket-activated units may auto-start the service again.
$ sudo systemctl reload ssh.service
Use reload-or-restart when a reload is preferred but not guaranteed: sudo systemctl reload-or-restart service-name.
$ sudo systemctl restart ssh.service
A restart drops existing connections and can abort in-flight work.
$ sudo systemctl daemon-reload
Required after changes under /etc/systemd/system. No services are restarted by this command.
$ sudo systemctl enable --now ssh.service Synchronizing state of ssh.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable ssh Created symlink /etc/systemd/system/sshd.service -> /usr/lib/systemd/system/ssh.service. Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service -> /usr/lib/systemd/system/ssh.service.
Use --now to start immediately during enablement: sudo systemctl enable --now service-name.
$ sudo systemctl disable ssh.service Synchronizing state of ssh.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable ssh Removed \"/etc/systemd/system/multi-user.target.wants/ssh.service\". Removed \"/etc/systemd/system/sshd.service\". Disabling 'ssh.service', but its triggering units are still active: ssh.socket
Use --now to stop immediately during disablement: sudo systemctl disable --now service-name.
$ systemctl is-active ssh.service active
Common states include active, inactive, and failed.
$ systemctl is-enabled ssh.service enabled
Common states include enabled, disabled, static, and masked.