Ubuntu – Gnome: Change title of current terminal from bash command line

bashgnomegnome-terminalubuntu 11.04

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?

Best Answer

Output a suitable xterm escape sequence.

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

See also How to change the title of an xterm.

Related Question