【Linux】linux history命令执行后显示历史命令执行时间

vim  ~/.bashrc 或者 ~/.bash_profile  或者 获取root权限修改vim /etc/profile

最后添加

export HISTTIMEFORMAT="%F %T  "(注意有两个空格)

保存后关闭xshell窗口,重新打开执行history命令

猜你喜欢

转载自www.cnblogs.com/itworkers/p/11770672.html