Belajar Sendiri

Commands

sudo systemctl

sudo systemctl <start|stop|restart|enable|disable|status> <service>

Risk: Careful

What it does

Talks to systemd, the shift manager: start, stop and check services.

When to use it

A service is down, needs new settings, or must start at boot.

Example

$ sudo systemctl restart nginx

Restart the web server with its new settings.

$ systemctl status nginx

Running, stopped or failed, plus the last log lines.

$ sudo systemctl enable --now nginx

Start now and at every boot.