0

I have some executable files in OS X which I want to access from terminal from any area. For example in Linux, we can copy executables or binaries to /usr/local/bin or /usr/bin. So similar to that where can I copy executables in OS X? I have downloaded Firefox and copied it to /Applications. Now I want to execute Firefox from any area without going in to the /Applications.

  • /Applications is the central location. ~/Applications is per user. – Tetsujin Feb 29 '16 at 14:59
  • I can see there is Firefox.app in /Applications. So now how can I execute firefox from terminal. – physics_for_all Feb 29 '16 at 15:04
  • 1
    open /Applications/Firefox.app – Tetsujin Feb 29 '16 at 15:07
2

/usr/local/bin is a suitable path for non-GUI applications. For example, you might put rsync 3.0 in there as compiled 'rsync3'.

This folder is listed in $PATH by default.

  • 1
    Why did this get downvoted? This answer makes sense for me. – Andy Ibanez Jun 26 '16 at 21:42
0

While /Applications is the central repository for installed Applications on OS X, you can put any executable anywhere and launch them from anywhere within terminal so long as its directory is in your path.

The question is, why exactly do you want to launch things like a browser, which is graphical in nature from the command line?

If you just want to type the name of the application, simply invoke Spotlight by pressing Command+Spacebar and start typing. It's how I normally launch apps that I don't have in my dock.

  • It is not exactly firefox, but some other software I want to execute. My software is called ds9. In linux, I just copy executable file of ds9 to /usr/local/bin and then execute ds9 from anywhere without every time going /usr/local/bin. I was looking for something in MAC. – physics_for_all Feb 29 '16 at 15:19
  • A Linux executable most likely will not operate on OS X without a recompile (a Java app, "should," however) as they are two completely different architectures. Do you know if your application works in OS X? Can you provide a link to it? – Allan Feb 29 '16 at 15:48
0

You could find all executable locations with the following command:

echo $PATH

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .