Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am very new to Mac, coming from Linux.

I am using TextMate, and I suddenly discovered I do not know how to launch TextMate from command line. Using completion, nothing looks like TextMate. Where is it located from a command line perspective?

Sorry for this odd question that also applies to other software, I guess.

share|improve this question
up vote 11 down vote accepted

For Textmate there is a command line tool, mate, that can be installed. Once installed you just use mate <file> to open that file in text mate.

For application that don't have a command line tool, you can use the open command with the -a flag and the name of the application. i.e.

open -a iTunes

This also works for TextMate:

open -a "TextMate 2"

The executable file is located in the app's Contents/MacOS subfolder, so for TextMate 2, it would be:


But if you run it from the command line like that, it will hang the shell until the application is quit (on certain older OSs; this was resolved as of 10.8) If this happens to you, put an & at the end of the command to background the process. Such as:

/Applications/TextMate\ &

The problem with this is that if the shell exits (by quitting Terminal or closing the window) then TextMate is terminated without warning.

share|improve this answer
Is there a possibility to create an alias to open -a iTunes to just type iTunes? – Felix_Sim Jan 7 '14 at 21:55
yes, in your .bashrc, type alias iTunes="open -a iTunes". Then exit out of the file, and then type source ~/.bashrc – sameetandpotatoes Jan 7 '14 at 22:02

Your Answer


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.