Linux history commands with timestamps, and message records the user's operation time and commands
Under / etc/profile or / etc/profile.d/, or add the following command to / etc/init.d/rc.local:
Export HISTTIMEFORMAT= "F T whoami"
Export PROMPT_COMMAND=' {msg=$ (history 1 | {read x y; echo $y;}); logger "[euid=$ (whoami)]": $(whoami): [pwd] "$msg";}'