linux开启history日志审计,位置在var/message

1.配置 /etc/profile 配置文件
2.export PROMPT_COMMAND=’{ msg=$(history 1 | { read x y; echo KaTeX parse error: Expected 'EOF', got '}' at position 4: y; }̲);logger "[euid…(whoami)]": ( w h o a m i ) [ p w d ] " (who am i) [pwd] " (whoami)[pwd]"msg";}’
添加在export下面。