Edit terminal title from the command line

tl;dr

export PROMPT_COMMAND='echo -ne "\033]0;NEW TEXT HERE\007"'

Edit terminal title from command line

To modify the window title directly, you just need to use this:

echo -ne "\033]0;NEW TEXT HERE\007"

But in a normal bash environment, your PROMPT_COMMAND will be executed before each display of the prompt, so to affect your interactive shell, you will need that export PROMPT_COMMAND.

References

Weblinks

  1. https://askubuntu.com/questions/22413/how-to-change-gnome-terminal-title
Advertisements