定制 bash 命令提示符

来源:互联网 发布:域名批量生成查询 编辑:程序博客网 时间:2024/05/17 03:34
Issue:  
1.  VM  Host的命令提示符:  bash-3.2@host$
  期望是:  username@host

点击(此处)折叠或打开

  1. bash-3.2$ echo $PS1
  2. \s-\v\$
  3. bash-3.2$ export PS1="\u@\h:\w\$"
Comment:  
1.  \u : username
2.  \h : hostname
3.  \w : working dir  path

add those  change  to the system  profile file 
1. make sure you are a root user
2. edit  /etc/profile file.  find  the segment related "PS1", add:
   export  PS1="\u@\h:\w\$"


Reference:
  1. http://blog.sina.com.cn/s/blog_87edb138010138lc.html
  2. http://www.233.com/linux/fudao/20100522/103437849.html
阅读(138) | 评论(0) | 转发(1) |
0

上一篇:CSRF verification failed. Request aborted

下一篇:读取excel文件并绘制图表[Python]

相关热门文章
  • python 自动化测试平台 Robot ...
  • python snmp 自动化2-在python...
  • python snmp 自动化测试1-安装...
  • 自动化测试详细测试计划 模板...
  • python snmp 自动化3-修改pyth...
  • Python 动态创建类
  • 一个基于multiprocessing的并...
  • Python 数据库管理与操作...
  • 利用Bicho抓取基于Jira的缺陷...
  • Lua中的协程即协同程序...
给主人留下些什么吧!~~
原创粉丝点击