Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to name a terminal window or even better give each tab a name. at the moment they just get the underlying process name : for example a tab running elasticsearch gets the name java

share|improve this question

2 Answers 2

up vote 5 down vote accepted

You can use @bubu 's solution, or you can right click on the tab, select "Inspect Tab", and set the title from there.

share|improve this answer
5  
Or press Cmd-I to get the inspector. –  Daniel Beck Dec 18 '10 at 5:16
1  
Shift-Command-I (Shell > Edit Title) also shows the Inspector and will ensure it selects the Info pane. –  Chris Page Aug 21 '11 at 7:59
1  
As of Mac OS X Lion 10.7, Terminal's Inspector also supports setting the tab title separately from the window title. –  Chris Page Aug 21 '11 at 8:09

Well.

echo -n -e "\033]0;In soviet russia, the title bar sets you\007"

will set your title to "In soviet russia, the title bar sets you"

share|improve this answer
3  
Or, even shorter, you can use echo -ne instead of echo -n -e. –  Wuffers Dec 18 '10 at 4:03
1  
Seems to me that the soviet russia jokes are not well received here... –  bubu Jun 7 '11 at 1:23
3  
Note that "0" sets both the window and the tab title. As of Mac OS X Lion 10.7, you can set them independently, using "1" (tab title) and "2" (window title). –  Chris Page Aug 21 '11 at 8:02
1  
I recommend using printf instead of echo, because it's simpler and more portable (the "-n" option is not defined in POSIX): printf '\e]0;...\a' –  Chris Page Aug 21 '11 at 8:07
1  
If you're interested in how this works, it uses an XTerm escape sequence (also known as a control sequence). A full list of sequences is available here. –  TachyonVortex Oct 27 '13 at 9:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.