echo 'export HISTTIMEFORMAT="%F %T `whoami` "' >> /etc/profile source /etc/profile
执行上面的语句,再执行history就是有时间了