Logs
text file with a lot of info about the system:
cat /var/log/syslog
cd /var/log
message log:
dmesg
first 10 lines:
head /var/log/syslog
last 10 lines:
tail /var/log/syslog
last 50 lines:
tail -n 50 /var/log/syslog
follow (last 10 lines, and follow the file for changes):
tail -f /var/log/syslog
example:
sudo systemctl restart ssh
journalctl, part of systemd.
example:
journalctl -u ssh
where u: unit
example:
journalctl -u apache2
Alternatively,
cat /var/log/syslog | grep apache2
example, follow unit:
journalctl -fu apache2
obtionally,
sudo systemctl restart apache2