Set the title bar text when you SSH to a server in Debian 12 (and others)

If you are logged into multiple servers it is quite useful to have CLEAR text in the title bar showing which server is which.

In your ~/.bash_profile

PROMPT_COMMAND="echo -ne \"\033]0;$1 ns1.myserver.com (Old)\007\""

OR

PROMPT_COMMAND="echo -ne \"\033]0;$1 ns1.myserver.com (New)\007\""

Now either log out and back in or run this command
source ~/.bash_profile

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.