Linux——给history命令加上用户和时间

能够在root下输入以下命令web echo 'export HISTTIMEFORMAT="%F %T `whoami` "' >>/etc/profile 执行source生效:bash   source /etc/profile 而后在使用history时,就会在前面显示时间和用户了。svg
相关文章
相关标签/搜索