6

This question already has an answer here:

In Ubuntu 14.10 LTS, I was able to set a terminal tab's title simply by right-clicking and choosing Set Title. This was using the default terminal application, gnome-terminal.

In Ubuntu 16.04 LTS, I can no longer set the title, and the terminal application is still gnome-terminal. The option Set Title is no longer in the menu.

Was this feature removed sometime between 14.10 and 16.04? How can I set a terminal tab's title in Ubuntu 16.04?

marked as duplicate by chaskes, Arronical, Community May 26 '16 at 16:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • How I couldn't find the original in my searching, I don't know. Thanks to those who found it! – Chris Cirefice May 26 '16 at 16:32
16

The option to set the terminal title has been deprecated in 16.04 LTS, however there is still a way to set the title. Edit your ~/.bashrc file and add the following lines:

# function to set terminal title
function set-title(){
  if [[ -z "$ORIG" ]]; then
    ORIG=$PS1
  fi
  TITLE="\[\e]2;$*\a\]"
  PS1=${ORIG}${TITLE}
}

After that close and reopen the terminal or source your .bashrc (command: source ~/.bashrc) and you can set the title by simply typing:

set-title "<title>"

The solution I found here and using it myself since I run on 16.04 LTS.

Not the answer you're looking for? Browse other questions tagged or ask your own question.