read the system logs
Find what went wrong: the errors since boot, a service's log, the kernel's messages.
Steps
-
journalctl -b -p errevery error since this boot
-
journalctl -xethe latest entries, explained
-
journalctl --since '1 hour ago'the last hour
-
journalctl -u NAMEone service's log
-
sudo dmesg -T | tail -50the kernel's latest messages: disks, USB, drivers
-
journalctl -b -1 -p errthe errors of the boot before, after a crash
Notes
- Without systemd's journal: /var/log/syslog or /var/log/messages.
Commands used
journalctldmesg
Each has a page in lore: lore journalctl opens it.
Related recipes
- schedule a command with cronRun a command every day, every hour or every few minutes, and see what is scheduled.
- why won't a service startRead what a systemd service said when it failed, check its unit file and its configuration, then start it again.
- add a userCreate an account with a home folder and a password, and let it use sudo if it should.
- count the processorsHow many processors and cores this machine has, and what they are.