Raspbian Pi – Log Viewing

sudo cat /var/log/auth.log – (Contains system authorization information)
sudo cat /var/log/boot.log (Contains information that is logged when the system boots up)
sudo cat /var/log/daemon.log (Contains information logged by the various background daemons)
sudo cat /var/log/dpkg.log (Contains information that is logged when a package is either installed or removed using dpkg)
sudo cat /var/log/syslog
sudo cat /var/log/nginx/access.log
sudo cat /var/log/apt/history.log
sudo cat /var/log/apt/term.log
sudo cat /var/log/faillog
journalctl -b
dmesg
history
lastlog

tail – If you want to view the content of the log files real time, as the application is writting to it, use “tail -f”.
grep – If you know exactly what you are looking for in a log file, you can quickly use grep command to grep a pattern.
less – Less command is very powerful to browse log files.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s