vim /etc/bashrc

在最后添加以下参数

export HISTTIMEFORMAT='%F %T '

export HISTFILESIZE=1000000

export HISTSIZE=10000

立即生效

source /etc/bashrc