1 由于~/.bash_history仅记录指令,我想要每次注销时都记录时间,并将后续的指令50笔记录下来,如何处理?
方法 : 通过在 ~/.bash_logout文件(注销时会自动调用)里使用date和 history 50 把内容写到指定的位置
vi ~/.bash_logout
date>> ./myhistory
history 50 >>./myhistory
clear
2 命令提示符(prompt)是通过修改 PS1 这个环境变量修改的
3 bash环境配置文件分为两种主要类型:
(1)login shell:主要读取 /etc/profile和 ~/.bash_profile
(2) nologin shell: 读取 ~/.bashrc
4 man的 配置文件在 /etc/man.config
5 登陆的欢迎字符串在 /etc/issue里 修改
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25099483/viewspace-1084216/
,如需转载,请注明出处,否则将追究法律责任。