هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
journald stores messages of the kernel, the boot, services and programs with many fields (unit, PID, UID, priority …). journalctl shows them, oldest first, in a pager. Filters can be combined: journalctl -u sshd -p warning --since today.
Normal users see their own messages; members of wheel, adm and systemd-journal see all. The journal is persistent only if /var/log/journal exists (or Storage=persistent).
طريقة الكتابة
journalctl [OPTION]... [FIELD=VALUE]...الخيارات 53
الأكثر استخدامًا
Filter
Output
Sources
Fields and boots
Maintenance
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 15
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Messages of one service
journalctl -u sshdEverything sshd logged.
2Errors since the boot
journalctl -p err -bThe first look after a problem.
3Follow a service live
journalctl -fu httpdLeave it open while you test.
4A time window
journalctl --since "2026-10-25 08:00" --until "2026-10-25 09:00"Also:
--since -2h,--since yesterday.5The boot before
journalctl --list-boots journalctl -b -1 -p warningWhy did the server crash or reboot?
6Kernel messages
journalctl -k -p warningDisk, memory and driver problems.
7All sudo commands today (audit)
journalctl _COMM=sudo --since todayUser, folder and command of each sudo call.
8Failed SSH logins (security)
journalctl -u sshd --since today -g 'Failed password|Invalid user'Many lines from one IP = a brute-force attack.
9Messages of one user
journalctl _UID=1001 --since todayWhat lisa's processes logged.
10All fields of one entry
journalctl -u sshd -n 1 -o verboseShows the fields you can filter on.
11JSON for tools
journalctl -u myapp -o json --since -10min | jq -r '.MESSAGE'Feed a SIEM or script.
12Explain a failure
journalctl -xeu httpd-x adds help text, -e jumps to the end.
13Disk use and cleanup
journalctl --disk-usage journalctl --vacuum-time=30dRemoves entries older than 30 days.
14Which units logged at all?
Lists every unit name in the journal.
15Check the journal for damage
journalctl --verifyPASS/FAIL per file.
لا يوجد شيء يطابق هذا الفلتر.
انتبه
- Without a persistent journal,
-b -1shows nothing: older boots are gone. - Times in --since need quotes when they contain a space.
الملفات
/run/log/journal/- Journal in memory (lost at reboot).
/var/log/journal/- Journal on disk (persistent).
/etc/systemd/journald.conf, /etc/systemd/journald.conf.d/- journald settings.
رموز الخروج
0 :: Done. 1 :: Error (or no match with some options).