让 history 命令显示日期和时间

echo 'HISTTIMEFORMAT="%F %T "' >> /etc/profile

source /etc/profile

原文地址:https://www.cnblogs.com/ccielife/p/11230711.html