Linux的history命令显示登陆时间、用户名以及操作命令

版权声明: https://blog.csdn.net/PlatoWG/article/details/82660975

1)修改/etc/profile增加以下几行

HISTTIMEFORMAT="%F %T `whoami` "     #设置history的显示格式
export HISTTIMEFORMAT

2)source /etc/profile

猜你喜欢

转载自blog.csdn.net/PlatoWG/article/details/82660975