Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know there are options to start a new terminal with a specified title, and that is is possible to change the title from a terminal using the menu: 'Terminal' -> Set Title.

However, I want to change it for a current terminal from command line. How can I change the title for an existing Gnome terminal from command line?

share|improve this question

migrated from stackoverflow.com Mar 12 '12 at 14:43

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 10 down vote accepted

Output a suitable xterm escape sequence.

echo -ne '\033]0;New title\007'

See also How to change the title of an xterm.

share|improve this answer
Thanks, will try this tomorrow! –  Sander Mar 12 '12 at 22:11
Perfect, thats it! :D Also, thanks for the very interesting link. –  Sander Mar 13 '12 at 15:26
Nice, but is it cross-platform compatible? –  l0b0 Mar 20 '12 at 15:00
ubuntuforums.org/archive/index.php/t-448614.html - there is a discussion regarding other terminals. I don't have many measuring points, but the xterm variete at least works for me in rxvt-unicode as well. –  Daniel Andersson Mar 20 '12 at 15:49
@tripleee: Usually it's recommended to use tput commands to print such escape sequences, as mentioned in this exact duplicate. –  l0b0 Mar 21 '12 at 8:27

If you need to set it to the hostname where you are logged into you can use:

echo -ne "\033]0;${HOSTNAME}\007"
share|improve this answer

It might be worth your while to try KDE. It has tabbed terminal windows, and each tab can be named just by right clicking on the tab.

share|improve this answer
Thanks for your suggestion, however, I'm still fond with Gnome :) –  Sander Mar 12 '12 at 22:10

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.