Modify the /etc/profile.d/history.sh configuration file to sort historical records by date and time. A maximum of 1000 historical records can be stored.
This method applies to all OSs except EulerOS.
vi /etc/profile.d/history.sh
export HISTTIMEFORMAT="%F %T `whoami` " export HISTSIZE=1000