Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use a specific server for connecting to all servers via SSH. When I connect to the SSH gateway server it perfectly says chronoz@sshgw in the PuTTY title bar and when I connect to a CentOS server this server appears as root@server01. It is very easy to switch between PuTTY windows with the different title bars.

Unfortunately the title bar does not change when I log into debian-servers. It still says chronoz@sshgw, while I am actually logged in into root@debianserver01.

How can I change this? It would greatly enhance my productivity.

share|improve this question
I found out about this feature today. I have marked 7,8 answers that really helped me as "Accepted". – ujjain Jun 12 '11 at 15:13
up vote 1 down vote accepted

It took me quite a while to figure it out, but the answer is as follows.

This is default behaviour on CentOS and not in Debian, because the relevant code has been edited out in the bashrc file located at /etc/bash.bashrc.

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

When commented out this perfectly displays administrator@hostname: ~ in the PuTTY title bar. ~ is the home-folder of the user and will continuously be updated to the current working directory.

administrator@debian: /home   
root@debian: /etc
root@debian: ~ (means you are in /root, your own home-directory)    
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.