Chinaunix首页 | 论坛 | 博客
  • 博客访问: 482040
  • 博文数量: 401
  • 博客积分: 244
  • 博客等级: 入伍新兵
  • 技术积分: 2215
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-04 10:02
文章分类

全部博文(401)

文章存档

2013年(37)

2012年(364)

分类:

2012-11-16 14:00:46

原文地址:定制 bash 命令提示符 作者:tastesweet

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:
阅读(549) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~