> For the complete documentation index, see [llms.txt](https://www.shellspells.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.shellspells.net/linux/system-ops/services/modify.md).

# Modify

## <mark style="color:red;">Systemd (most modern distributions)</mark>

<table data-header-hidden data-full-width="true"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>systemctl start [service_name]</code></mark></td><td>Starts a stopped service.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl stop [service_name]</code></mark></td><td>Stops a running service.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl restart [service_name]</code></mark></td><td>Restarts a running service.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl enable [service_name]</code></mark></td><td>Enables a service to start automatically at boot.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl disable [service_name]</code></mark></td><td>Disables a service from starting automatically at boot.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl reload [service_name]</code></mark></td><td>Reloads the service configuration without restarting it (if supported).</td></tr><tr><td><mark style="color:yellow;"><code>systemctl mask [service_name]</code></mark></td><td>Prevents a service from being started manually or automatically.</td></tr><tr><td><mark style="color:yellow;"><code>systemctl unmask [service_name]</code></mark></td><td>Reverses the effect of mask, allowing the service to be started again.</td></tr></tbody></table>

## <mark style="color:red;">SysV init (older distributions)</mark>

<table data-header-hidden data-full-width="true"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>service [service_name] start</code></mark></td><td>Start</td></tr><tr><td><mark style="color:yellow;"><code>service [service_name] stop</code></mark></td><td>Stop</td></tr><tr><td><mark style="color:yellow;"><code>service [service_name] restart</code></mark></td><td>Restart</td></tr><tr><td><mark style="color:yellow;"><code>service [service_name] reload</code></mark></td><td>Reload</td></tr><tr><td><mark style="color:yellow;"><code>chkconfig [service_name] on</code></mark></td><td>Enables a service at boot.</td></tr><tr><td><mark style="color:yellow;"><code>chkconfig [service_name] off</code></mark></td><td>Disables a service from starting at boot.</td></tr><tr><td><mark style="color:yellow;"><code>update-rc.d [service_name] start &#x3C;runlevels></code></mark></td><td>(SysV init) Enable service in specific runlevels at boot.</td></tr><tr><td><mark style="color:yellow;"><code>chkconfig [service_name] on/off</code></mark></td><td>(SysV init) Enable/disable service for all runlevels.</td></tr></tbody></table>

## <mark style="color:red;">Upstart (rarely used now)</mark>

<table data-header-hidden data-full-width="true"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>start/stop/restart [service_name]</code></mark></td><td>Service commands.</td></tr><tr><td><mark style="color:yellow;"><code>initctl start [service_name]</code></mark></td><td>Starts a service.</td></tr><tr><td><mark style="color:yellow;"><code>initctl stop [service_name]</code></mark></td><td>Stops a service.</td></tr></tbody></table>
