Quickly inspect file ends and follow live updates with the tail command. 11.05.2026 | reading time: 2 min Want to see the latest lines in a file or watch a log as it grows? The Linux command `tail` prints the last part of files and can follow them live, making it ideal for quick checks and real-time troubleshooting. Live log monitoring Use `tail` to inspect the last lines and follow new entries; here is a practical demonstration with typical output: ```bash\n$ tail -n 5 /var/log/syslog\nOct 11 10:12:34 localhost sudo: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/ls\nOct 11 10:12:35 localhost systemd: Started Session 1 of user\nOct 11 10:12:36 localhost sshd[1234]: Accepted password for user from 192.0.2.1 port 3456\nOct 11 10:12:37 localhost kernel: audit: type=1400 msg=audit(...)\n\n$ tail -f /var/log/syslog\n# (now watching for new lines)\nOct 11 10:12:38 localhost app[2000]: Processing request id=abcd\nOct 11 10:12:39 localhost app[2000]: Request completed id=abcd\n``` Options that change everything Explore the switches: `-n` selects lines, `-c` selects bytes, `-f` follows file growth and `-F` follows even if the file is rotated, `--follow=name` handles replaced files and `--pid=PID` stops when a process exits; use `-v` to label multiple files or `-q` to suppress headers, and remember `tail -n +NUM` starts at a given line number for scripted processing. When tail isn't enough Combine `tail` with tools like `grep` or `awk` for focused streaming, prefer `tail -F` if logrotate renames files, and switch to `journalctl` for systemd-managed logs or `multitail` for colorized multi-log views when monitoring many sources at once. Finish line and next steps Mastering `tail` gives immediate visibility into what just happened; practice following logs, piping output into filters, and embedding `tail` calls into scripts to automate checks, then build broader skills toward certifications like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities troubleshooting processes