Linux在history添加时间和用户

设置显示时间和用户

1
echo 'export HISTTIMEFORMAT="[%Y.%m.%d %H:%M:%S] [`whoami`] "' >> /etc/profile

执行source使配置生效

1
2

source /etc/profile

history

踏浪 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
坚持原创技术分享,您的支持将鼓励我继续创作!