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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxstoppedoff at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxstoppedoff at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
Hint
Watch the Services light turn green.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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxstoppedoff at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd
Hint
--now means “and start it right away too”.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
systemctl status sshsystemctl is-enabled sshsystemctl list-units --type=service
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Semalam bekalan elektrik terputus. Server hidup semula. Laman web menu tidak. Tiada siapa sentuh. Apa yang berlaku?
nginx ialah service (servis): pekerja yang bertugas sepanjang hari di belakang. systemd ialah pengurus syif. nginx inactive sekarang, dan disabled semasa but.
Anda taip systemctl start nginx, tanpa sudo. Apa jadi?
Mulakan web server sekarang: sudo systemctl start nginx. Kemudian minta laman itu: curl -sI localhost.
Sesetengah arahan bertindak sekarang. Yang lain tentukan apa berlaku pada but seterusnya. Asingkan.
Buat kedua-dua kerja sekali gus: hidupkan nginx sekarang dan setiap kali but: sudo systemctl enable --now nginx.
--now maksudnya “dan mulakan sekarang juga”.Anda ubah fail tetapan nginx. Arahan mana buat nginx guna tetapan baru?
Kini anda boleh mula, henti, mula semula dan enable sesuatu servis.
You finished this before. Practice is always welcome!
Official docs: systemctl (Debian 13 man page) · systemd.io: the systemd project · Debian Reference: system initialization
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?