Show recent Fail2ban decisions
Build a paste-ready command, then review its compatibility and effects before running it.
journalctl -u fail2ban --since -1h --no-pager | tail -30read-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementsjournalctljournalctl must be installed and available on PATH.
Version supportjournalctl Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsJul 24 12:02:11 host fail2ban.actions[611]: NOTICE [sshd] Ban 198.51.100.7Representative successful output; values vary with the selected target and system state.
Known errorsjournalctl: command not foundjournalctl is missing or is not available on PATH.
Verifyjournalctl -u fail2ban --since -1h --no-pager | tail -30The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01journalctlCommandRuns the journalctl stage of this one-liner.
02-uOptionRestricts journal records to the named systemd unit.
03fail2banArgumentPasses fail2ban to journalctl.
04--sinceOptionLimits results to entries after the supplied time.
05-1hOptionConfigures journalctl with the -1h option.
06--no-pagerOptionPrints directly instead of opening an interactive pager.
07|PipelinePasses the output on the left to the command on the right.
08tailCommandRuns the tail stage of this one-liner.
09-30OptionConfigures tail with the -30 option.
Example input
journalctl -u fail2ban --since -1h --no-pager | tail -30
Example output
Jul 24 12:02:11 host fail2ban.actions[611]: NOTICE [sshd] Ban 198.51.100.7
Jul 24 12:12:11 host fail2ban.actions[611]: NOTICE [sshd] Unban 198.51.100.7
Illustrative output — exact values vary by system and data.
Official sources