How to Set Terminal Titles in Ubuntu 16+

Setting terminal titles was a super useful feature in Ubuntu before 16.04. Here’s how to do it in modern versions:

Add the following to .bashrc

set-title(){
ORIG=$PS1
TITLE="\e]2;$@\a"
PS1=${ORIG}${TITLE}
}

Use the command:

set-title title_of_window

Leave a Reply

Your email address will not be published. Required fields are marked *