Chinaunix首页 | 论坛 | 博客
  • 博客访问: 53862
  • 博文数量: 40
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 451
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 11:41
文章分类

全部博文(40)

文章存档

2010年(23)

2009年(17)

我的朋友

分类: LINUX

2010-03-19 17:36:12

putty在suse下使用时发现标题不变,没法区分终端和服务器对应关系,网上找了个办法,修改了一下,很好使。
如果想是根据路径变化而变化,也可以修改,不过我还没仔细想,呵呵

putty的标题改变为主机名+ip地址的方法
vim  .bashrc  
 
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
 
#title can be anything
export title=`hostname`
export ip=`/sbin/ifconfig eth0 | awk '/inet addr/ {print $2}' | cut -f2 -d ":"`
export PS1='\e]2; \[$title -\] \[$ip -\]  \u\w\a[\u \W]\$'
export LANG=C
阅读(342) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~