I'm using Ubuntu 18 default setup with GNOME Terminal. I can do New Tab, but I'm not finding a way to name/title an existing tab: there is no Set Title option in the Terminal menu, and I can't find a way to get gnome-terminal --tab --title SOMETHING to operate on existing tab. Currently I have defined these in my .bashrc:

tt() { [[ -n $1 ]] && echo -ne "\e]0;$1\a" || echo Need tab title; } 
ntt() { [[ -n $1 ]] && gnome-terminal --tab --title $1 || echo Need tab title; }

I have tried guake and termit and tilix are the only ones out of a dozen that seem to support renaming tab from GUI (several that I tried were unstable or output a bunch of stuff to stderr, would rather not use -- like terminology and terminator).

The custom commands work, but

  1. is there a way to set GNOME Terminal tab title of existing tab from command line without such arcane sequence of escape characters (as seen https://askubuntu.com/a/22417/738406)
  2. is there a better terminal emulator, ie one that is at least as good as GNOME Terminal but also supports doing #1 and additionally set tab title from GUI?
  • @Fox yes I know I have done that in the meantime but would rather find out if there is a builtin solution rather than re-invent the wheel, seems like such a basic need
    – Oliver
    Jan 24, 2019 at 21:16
  • To whoever downvoted, I have added more info about what I tried.
    – Oliver
    Jan 24, 2019 at 21:23
  • xfce4-terminal provides an option to rename a tab by right-clicking on the tab.
    – finswimmer
    Jan 25, 2019 at 5:22

1 Answer 1


I was very frustrated when gnome-terminal stopped allowing tab naming. My solution was to create a function that is stored in my .bash_functions file that is sourced by my .bash_profile. This is that function:

function tabname() { newName="$1" PROMPT_COMMAND='echo -ne "\033]0;$newName\007"' }

You use it by switching to the tab you want to rename, such as "myTab":

tabname "myTab"

  • Thanks but this is too similar to what I already describe in my question (see tt and NTT functions). This approach works, but also means everyone is reinventing the wheel, I was hoping I had missed something obvious that would not require this approach.
    – Oliver
    Feb 3, 2019 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .