⌨️journalctl
Also known as journalctl Command, systemd Journal, System Log
A command that reads the system log. It can show one service at a time.
Think of it like
Think of it like a ship's logbook. Every event goes in, and you can read back what happened.
Example
Jack's web server will not start. He runs journalctl -u nginx and sees a typo in a settings file.
Why it matters
A service that fails rarely says why on screen. The reason is almost always in the log.
Definition
Example code
console
$ journalctl -u ssh -n 1
Nov 16 09:00:01 web1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.Common mistake
Key takeaways
- 1One log. Every service writes to it.
- 2-u for one service. Shows only that service.
- 3-f to follow. Watch new lines arrive.