公司用了跳板机,登录什么机器都是跳板机的标签名称,终端多了就不知道是哪个。
可以在linux里通过shell 命令的方式 来修改xshell的标签名称
echo -en "\033]0;New terminal title\a"
这样就可以将xshell的标签变为需要的字符
登录后就立刻设置:
加到
~/.bashrc
最后一行就可以了
如果所有用户都是这样的配置可以修改为hostname
/etc/basrc
添加:
echo -en "\033]0;${HOSTNAME}\a"
参考:
How to change the title of the current terminal tab using only the command line
转载于:https://blog.51cto.com/axe999/2095787