BM: Baca dalam Bahasa Melayu
World L2: Keys & Staff
Logs with journalctl
You will learn: to read a service's diary and find the one line that says what went wrong.
Checked with Linux (Debian 13) on 1 Nov 2026
The problem
systemctl is-active nginx says failed. The web server tried to start this morning and gave up. Where did it say why?
Pick one answer.
Watch
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx failed.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxfailedstarts at boot
The journal: systemd's diary of what every service said and did. journalctl reads it. is the shift manager’s diary. -u nginx keeps nginx’s lines. -n 5 shows the last five. Find the [emerg] line.
Predict
Without sudo, journalctl -u nginx shows a Hint and no nginx lines. Why?
Pick one answer.
Check
Tap the line that says what actually broke.
0 of 1 found
Try it
Long diaries hide the one line you need. Search it: sudo journalctl -u nginx -g emerg.
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx failed.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxfailedstarts at boot
Hint
-g means “grep”: keep only matching lines.Check
Which switch do you need?
Drag a card into a box. Or tap the card, then tap the box.
Check
The diary blames line 44, but line 41 reads root /var/www/html with no ;. What fixes it?
Pick one answer.
You did it!
You can now read a service’s diary and find the line that matters.
Go deeper (optional)
systemd’s own error message suggests journalctl -xeu nginx.service: -x adds help text and -e jumps to the end. Errors often point one line late, as here. The boss fixes a broken nginx with all of this.
Real rep (optional): on a Debian or Ubuntu VM, sudo journalctl -u ssh -n 10 shows recent logins.
Bahasa Melayu
systemctl is-active nginx kata failed. Web server cuba bermula pagi tadi dan berputus asa. Di mana ia beritahu sebabnya?
Journal (jurnal) ialah diari pengurus syif. -u nginx simpan baris nginx sahaja. -n 5 tunjuk lima terakhir. Cari baris [emerg].
Tanpa sudo, journalctl -u nginx tunjuk satu Hint dan tiada baris nginx. Kenapa?
Diari panjang menyorok baris yang anda perlu. Carilah: sudo journalctl -u nginx -g emerg.
-g maksudnya “grep”: simpan baris yang padan sahaja.Suis mana yang anda perlukan?
Diari salahkan baris 44, tapi baris 41 tertulis root /var/www/html tanpa ;. Apa yang membaikinya?
Kini anda boleh baca diari servis dan cari baris yang penting.
You finished this before. Practice is always welcome!
Official docs: journalctl (Debian 13 man page) · nginx: core module (root, listen …) · Debian Reference: system logs
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?