World map

 

BM: Baca dalam Bahasa Melayu

World L2: Keys & Staff

Services with systemctl

You will learn: to check, start, stop and restart a service, and make it start at boot.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

Last night the power went out. The server came back. The menu website did not. Nobody touched it. What happened?

Pick one answer.

Watch

You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx stopped.

You are hereyou@kedai:~$

Folder ~

Empty folder

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxstoppedoff at boot

Phone lines (network) Address 10.0.0.5

Listening ports

  • :22 sshd

nginx is a service: A program that runs in the background all day, like the web server. systemd starts and watches it.: staff who work all day in the back. systemd is the shift manager. nginx is inactive now, and disabled at boot.

Predict

You type systemctl start nginx, without sudo. What happens?

Pick one answer.

Try it

Start the web server now: sudo systemctl start nginx. Then ask for the page: curl -sI localhost.

You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx stopped.

You are hereyou@kedai:~$

Folder ~

Empty folder

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxstoppedoff at boot

Phone lines (network) Address 10.0.0.5

Listening ports

  • :22 sshd

Check

Some commands act now. Others decide what happens at the next boot. Sort them.

Drag a card into a box. Or tap the card, then tap the box.

      Try it

      Do both jobs in one go: start nginx now and at every boot: sudo systemctl enable --now nginx.

      You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx stopped.

      You are hereyou@kedai:~$

      Folder ~

      Empty folder

      + 3 hidden (ls -a)

      Services

      • cronrunningstarts at boot
      • sshrunningstarts at boot
      • nginxstoppedoff at boot

      Phone lines (network) Address 10.0.0.5

      Listening ports

      • :22 sshd

      Check

      You changed nginx’s settings file. Which command makes nginx use the new settings?

      Pick one answer.

      You did it!

      You can now start, stop, restart and enable a service.

      Go deeper (optional)

      systemctl status nginx shows it all: a green ● running, ○ stopped, × failed, plus the last log lines. reload re-reads settings without dropping visitors. systemctl list-units --type=service lists every service.

      Real rep (optional), on a Debian or Ubuntu VM:

      Real mission

      1. systemctl status ssh
      2. systemctl is-enabled ssh
      3. systemctl list-units --type=service

      0 of 3 steps done · Your ticks are saved.