I don't really understand the difference. I tried putting a .app file in /usr/bin and executing if from the terminal but that doesn't do anything. What kind of files go in there?


Wikipedia has a good article on Application Bundles.

In short, a .app is not a file: it's a directory tree with a specific structure. The actual binary that runs (ie, the equivalent of the binary you'd find in /usr/bin) is PackageName.app/Contents/MacOS/PackageName. However, you (generally) can't just copy that file to '/usr/bin' and run it, because it will expect to have lots of other files it needs inside the .app folder as well - for instance, many applications have the translation files that allow them to present the UI in different languages under PackageName.app/Contents/Resources/de.lproj (where de happens to mean german).

In some cases, the .app bundle may contain executables you can execute directly - for instance, I often use the ebook-convert binary from the calibre.app bundle, by running /Applications/calibre.app/Contents/Resources/loaders/ebook-convert. In this case, ebook-convert happens to be a self-contained python script and is perfectly happy being called this way - not all executables will be as happy.

You can usually start a .app by calling the main binary directly - eg, /Applications/Safari.app/Contents/MacOS/Safari will launch Safari. However, this is a lot of typing - open /Applications/Safari.app is a shortcut that does the same thing.

man open has many more examples of using open to act as though the user had double-clicked on an icon in finder.

  • Just a note to add here. In the Finder you can see what's inside an Application Bundle (or any bundle) by right clicking on its icon and selecting "Show Package Contents" from the context menu. – Josh Feb 27 '10 at 16:11

As Tomas Markauskas said, the .app is a bundle.

Why did you try to move a .app file to /usr/bin? I'm going to guess that what you really want to know is "how do I open a file using Foo.app when I'm at the command line?"

If I'm right, the answer isn't to move the .app file to /usr/bin. The right answer is to use the open command:

$ open -a Foo some_file

Using open without the -a will open the file with its default application -- just as if you double-clicked on some_file in the Finder.


.app is actually not a file, but a folder (or Application bundle) with many different files in it. It also contains the executable files that you actually run.


You can also run the app directly with the open command:

open /Applications/Safari.app/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy