Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

See also

On our CentOS system, the log file is transient, being lost upon reboot. While it's live, it exists in /run/log/journal/:

$ ls /run/log/journal/4eabd6271dbf4ed0bc608378f4311df8$ sudo ls -lh /run/log/journal/4eabd6271dbf4ed0bc608378f4311df8/total 4.0M-rwxr-x---+ 1 root systemd-journal 4.0M Oct  9 18:43 system.journal
We could actually change this behavior quite easily, by adding a /var/log/ directory specifically for the journal, and using a one-liner to change the permissions: sudo systemd-tmpfiles --create --prefix /var/log/journal

You can also list the boots journalctl is aware of from the command line:

$ sudo journalctl --list-boots 0 b4c3669c7a9841ba841c330a75125e35 Tue 2018-10-09 18:43:07 UTC—Wed 2018-10-10 18:13:27 UTC
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content