Push in-memory journal entries to persistent storage with a quick journalctl command. 16.11.2025 | reading time: 2 min When changes require the in-memory systemd journal to be written to disk, the `journalctl --flush` command is the straightforward tool to use; this short guide shows why you might need it and how to run it safely. Quick real-world example Imagine a machine where persistent logging was just enabled and the administrator wants to commit volatile logs to /var/log/journal without rebooting; run the commands below to see disk usage, flush the runtime journal, and confirm the change: ``` $ sudo journalctl --disk-usage Archived and active journals take up 0.0B in the file system. $ sudo journalctl --flush $ echo $? 0 $ sudo journalctl --disk-usage Archived and active journals take up 6.8M in the file system. ``` Why and when to flush Flushing is useful after enabling persistent logging, before creating backups, or when preparing a system for maintenance so recent logs are preserved; the command itself normally produces no output on success, so check exit status or verify disk usage with `journalctl --disk-usage` or inspect files under `/var/log/journal`. Practical tips and caveats Remember that flushing writes volatile journal data to persistent storage, which consumes disk space, so combine `journalctl --flush` with rotation and vacuuming policies like `journalctl --rotate` and `journalctl --vacuum-size` for long-term control; if flushing appears ineffective, ensure `/var/log/journal` exists, check permissions, or restart `systemd-journald` with `systemctl restart systemd-journald` as a fallback. Next step Use these commands on a test host first, incorporate flushing into maintenance scripts where appropriate, and keep exploring systemd logging to improve operational confidence and troubleshooting skills; consider deepening your Linux expertise with exam-focused training such as CompTIA Linux+ or LPIC-1 at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities storage filesystem troubleshooting processes