If you don&#x27;t want to install a &quot;real&quot; solution like Snoopy Logger that works for all users&#x2F;shells&#x2F;edge cases, you could always adapt the bash prompt to write the command out. E.g. I personally use something like this in my .bashrc which logs everything per user, but you could easily adapt this to post to Slack instead:<p><pre><code>    # Adapted from https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;207813&#x2F;how-to-log-every-command-typed-into-bash-and-every-file-operation
    export ETERNAL_AUDIT_LOGFILE=~&#x2F;.bash_eternal_auditlog
    PROMPT_COMMAND=&#x27;RET_VAL=$?; history -a; echo &quot;$(who am i | sed -e &quot;s&#x2F;[[:space:]]\+&#x2F; &#x2F;g&quot;) [$$]: $(history 1 | sed &quot;s&#x2F;^[ ]*[0-9]\+[ ]*&#x2F;&#x2F;&quot; ) [$RET_VAL]&quot; &gt;&gt; $ETERNAL_AUDIT_LOGFILE&#x27;
</code></pre>
Output including return code and all parameters:<p><pre><code>    ubuntu pts&#x2F;0 2016-01-22 13:24 (example-loggedinuser-rdns.yourisp.com) [4379]: [2016-01-22 13:25:37] ps aux | grep python [0]
</code></pre>
If you assume no malicious users this will work just fine.