naming terminal tabs on ubuntu

before naming terminal:

after naming ternimal:

Code snippet to achieve the same:

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:

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

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