naming terminal tabs on ubuntu

before naming terminal:

/images/terminal-rename-1.png

after naming ternimal:

/images/terminal-rename-2.png

Code snippet to achieve the same:

1
echo -ne "\033]0;<title-str>\007"


Now one could go about writing a small script to achieve this: vim ~/.bashrc and add following function in there:

1
set_title() {printf "\033]0;$*\007";}


ref: https://askubuntu.com/a/143514