How can I redirect audit messages from dmesg?

December 29, 2025 2 answers
Asked by CuriousCat42
I'm looking for a way to get only the 'audit' messages from dmesg since it's become pretty lengthy. I'd love to keep my logs more organized and would prefer any simple commands to achieve this. I'd appreciate straightforward advice without any mockery, please!

Answers

UserFriendly197
You should be able to log audit messages automatically to `/var/log/audit/audit.log`. Check out `auditd.conf(5)` for options on changing that path if needed. That way, you can separate your audit logs from the dmesg output.
Reply to this answer
TechSavvyGal88
I tried that, and it worked for me! Just a heads upโ€”Firefox might still be generating log entries even if you've excluded user processes from your audit rules. But as long as it doesnโ€™t clutter your system messages, I think youโ€™ll be fine!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions