Gnome: Change title of current terminal from bash command line

Output a suitable xterm escape sequence.

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

See also How to change the title of an xterm.


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

echo -ne "\033]0;${HOSTNAME}\007"