root@localhost:~# vim /etc/profile # 添加一行 export HISTTIMEFORMAT="%F %T " root@localhost:~# source /etc/profile