Manually Set the Terminal Title in OSX

Posted by Tejus Parikh on March 14, 2010

Having the process automatically set the name of the terminal in OSX almost never works for me. A little googling turned up the bash sequence for setting the process name in the terminal.

echo -n -e "\033]0;TerminalName\007"

This command will set the name of the terminal to “TerminalName.” Instead of trying to remember this string, I created a little shellscript:


echo -n -e "\033]0;$1\007"

I called this script setname and put it in /usr/local/bin. Then you can call it with:

setname TerminalName

Related Posts:

Tejus Parikh

Tejus is an software developer, now working at large companies. Find out when I write new posts on twitter, via RSS or subscribe to the newsletter: