Where to start First steps track · 15 stages
Linux Labs

Logs

  • tail — the last lines and following a log

    The tail command prints the end of a file, and with -f it keeps showing new lines as they are appended to a log.

    tailtail -ntail -f

    5 min
  • journalctl — reading the systemd journal

    Reading the systemd journal (journald) — filters by service, time, priority.

    journalctl -ujournalctl -xeujournalctl -p

    5 min
  • Log rotation with logrotate

    Keeping logs from filling the disk — rotation, compression, retention, checking configs.

    logrotate -dlogrotate -fcat

    4 min
  • dmesg — kernel messages: OOM, disk and filesystem errors, segfaults

    dmesg prints the kernel ring buffer: messages about disks, filesystems, OOM, crashed programs and hardware.

    dmesg -Tdmesg -ldmesg -x

    9 min
  • rsyslog — system logs

    Writes text logs to /var/log and forwards them over the network; it does not rotate them itself, that's logrotate's job.

    tail -frsyslogd -N1logger -p

    4 min
  • auditd — security auditing

    Kernel-level auditing — who did what and when; watch rules and event search.

    auditctl -wauditctl -aauditctl -l

    8 min
  • fail2ban

    Log-based banning — protecting SSH and services from brute force; jails, status, unban.

    fail2ban-client statusfail2ban-client setfail2ban-regex

    7 min
Loading…