Add following code to .bashrc
function title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=${ORIG}${TITLE}
}
And source ~/.bashrc
Then open a terminal and run command title:
After execute this command:

Add following code to .bashrc
function title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="[e]2;$*a]"
PS1=${ORIG}${TITLE}
}
And source ~/.bashrc
Then open a terminal and run command title:
After execute this command: