Thursday, September 8, 2022

journalctl - query the systemd journal in Linux

sudo nano /etc/systemd/journald.conf

SystemMaxUse=128M // remove # => uncomment

MaxFileSec=2day // remove # => uncomment

sudo systemctl restart systemd-journald


sudo journalctl --rotate

sudo journalctl --vacuum-time=2d

journalctl --vacuum-size=128M


sudo rm /var/log/syslog.1 // 9.2 GB

/run/log/journal

/var/log/journal

https://www.freedesktop.org/software/systemd/man/journald.conf.html

https://manpages.ubuntu.com/manpages/kinetic/man1/journalctl.1.html

No comments:

Post a Comment