Mac OS X: conventional places where binary files should live











up vote
47
down vote

favorite
18












I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly.




  1. What are the conventional paths used for something like this? /usr/bin? Are there different options, one if I want it for all users, and one if I want it for just a particular user, like my administrator account?


  2. Or should I put it in its own directory under the Applications directory, and add it to the path? If so, which file controls where the path is set?











share|improve this question




























    up vote
    47
    down vote

    favorite
    18












    I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly.




    1. What are the conventional paths used for something like this? /usr/bin? Are there different options, one if I want it for all users, and one if I want it for just a particular user, like my administrator account?


    2. Or should I put it in its own directory under the Applications directory, and add it to the path? If so, which file controls where the path is set?











    share|improve this question


























      up vote
      47
      down vote

      favorite
      18









      up vote
      47
      down vote

      favorite
      18






      18





      I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly.




      1. What are the conventional paths used for something like this? /usr/bin? Are there different options, one if I want it for all users, and one if I want it for just a particular user, like my administrator account?


      2. Or should I put it in its own directory under the Applications directory, and add it to the path? If so, which file controls where the path is set?











      share|improve this question















      I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly.




      1. What are the conventional paths used for something like this? /usr/bin? Are there different options, one if I want it for all users, and one if I want it for just a particular user, like my administrator account?


      2. Or should I put it in its own directory under the Applications directory, and add it to the path? If so, which file controls where the path is set?








      macos terminal shell path






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 '15 at 4:00









      Peter Mortensen

      8,326166184




      8,326166184










      asked Jul 17 '09 at 14:44









      Jason S

      2,863115173




      2,863115173






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          38
          down vote



          accepted










          Core answer: you probably want /usr/local/bin. Depending on how recent your macOS is, you may need to update your default $PATH. See below for further details.



          UPDATE 12-01-2018 At some point since I wrote my original answer, Apple changed its default $PATH. As a result, a lot of what I say below is irrelevant to recent Macs. If you type echo $PATH in a terminal, and /usr/local/bin is first, then you can ignore everything below about changing your $PATH.



          Original answer



          Macs are unusual in this regard. The default $PATH variable for a regular user looks like this:



          /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


          By putting /usr/local/bin after /usr/bin and /bin, Mac upends the usual system. Normally, you can put something into /usr/local/bin (say a second Perl interpreter, compiled in some non-standard way), and then a regular user will hit the custom one rather than the system-wide one first. This is good. Users can get variants, but the system stays pure. Given Apple’s default $PATH, however, items in /usr/bin or /bin will get found before anything in /usr/local/bin. (This basically defeats the purpose of installing, e.g., the custom Perl in /usr/local/bin.)



          To fix this, you can change the regular user's $PATH by editing the .profile file in the user's home directory. (That file may not exist, if you have a brand-new install. In that case, create it.)



          Semi-related: Homebrew provides excellent package management for Macs. By default, Homebrew installs software into /usr/local, but it does so in a way that makes it very easy to remove things and return to a vanilla state later.






          share|improve this answer



















          • 1




            On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
            – Legolas
            Nov 30 at 15:15






          • 1




            @Legolas Apple appears to have changed how they handle this. I'll edit the post.
            – Telemachus
            Dec 1 at 15:21


















          up vote
          9
          down vote













          /usr/local/bin and /usr/local/sbin are well worth adding to your path, as a lot of makefiles for source builds are defaulted to install there.



          If you use MacPorts, it's worth adding /opt/local/bin and /opt/local/sbin as well.



          The best way to do this is to add



          export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH



          to the .bashrc file in your home directory (which is hidden, so the CLI is the best way to to do this), or, if you want to change the system wide path, add the same line to /etc/bashrc (not hidden), but you will need to sudo to do this.



          If you don't have a .bashrc in any user's home, you can make one and add this line to it, but remember to change the permissions on the file you create to make it readable by the user in question (obviously not relevant if you're doing it for your own profile).



          The $PATH at the end appends the system default path to whatever you put before. Note that the system searches for binaries in the order of paths given, so if you install a binary in /usr/local or /opt/local that is also installed by default on the system, the versions you install will be found first, which can (though rarely) upset things. It is worth watching out for.



          Good information is here.



          I should note that the above assumes you are using Bash for the shell, which is the default on Mac OS X v10.4 (Tiger) and Mac OS X v10.5 (Leopard), but not on earlier systems, which used tcsh instead, which has a different syntax.



          I hope that helps...






          share|improve this answer



















          • 1




            /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
            – Telemachus
            Jul 17 '09 at 15:13










          • well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
            – avstrallen
            Jul 17 '09 at 15:15






          • 1




            I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
            – avstrallen
            Jul 17 '09 at 15:18










          • "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
            – Jason S
            Jul 17 '09 at 15:32










          • No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
            – avstrallen
            Jul 17 '09 at 15:42


















          up vote
          7
          down vote













          I tend to go with /usr/local. Here's a nice explanation why, which refers to Filesystem Hierarchy Standard (FHS).⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢, which in turn says about /usr/local:




          Tertiary hierarchy for local data, specific to this host. Typically
          has further subdirectories, e.g., bin, lib, share.⁢







          share|improve this answer























          • Yep, it's pretty much the same as other *nix operating systems in that regard.
            – jtbandes
            Jul 24 '09 at 17:29






          • 1




            Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
            – DavidPostill
            Nov 15 '16 at 11:53











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f7150%2fmac-os-x-conventional-places-where-binary-files-should-live%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          38
          down vote



          accepted










          Core answer: you probably want /usr/local/bin. Depending on how recent your macOS is, you may need to update your default $PATH. See below for further details.



          UPDATE 12-01-2018 At some point since I wrote my original answer, Apple changed its default $PATH. As a result, a lot of what I say below is irrelevant to recent Macs. If you type echo $PATH in a terminal, and /usr/local/bin is first, then you can ignore everything below about changing your $PATH.



          Original answer



          Macs are unusual in this regard. The default $PATH variable for a regular user looks like this:



          /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


          By putting /usr/local/bin after /usr/bin and /bin, Mac upends the usual system. Normally, you can put something into /usr/local/bin (say a second Perl interpreter, compiled in some non-standard way), and then a regular user will hit the custom one rather than the system-wide one first. This is good. Users can get variants, but the system stays pure. Given Apple’s default $PATH, however, items in /usr/bin or /bin will get found before anything in /usr/local/bin. (This basically defeats the purpose of installing, e.g., the custom Perl in /usr/local/bin.)



          To fix this, you can change the regular user's $PATH by editing the .profile file in the user's home directory. (That file may not exist, if you have a brand-new install. In that case, create it.)



          Semi-related: Homebrew provides excellent package management for Macs. By default, Homebrew installs software into /usr/local, but it does so in a way that makes it very easy to remove things and return to a vanilla state later.






          share|improve this answer



















          • 1




            On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
            – Legolas
            Nov 30 at 15:15






          • 1




            @Legolas Apple appears to have changed how they handle this. I'll edit the post.
            – Telemachus
            Dec 1 at 15:21















          up vote
          38
          down vote



          accepted










          Core answer: you probably want /usr/local/bin. Depending on how recent your macOS is, you may need to update your default $PATH. See below for further details.



          UPDATE 12-01-2018 At some point since I wrote my original answer, Apple changed its default $PATH. As a result, a lot of what I say below is irrelevant to recent Macs. If you type echo $PATH in a terminal, and /usr/local/bin is first, then you can ignore everything below about changing your $PATH.



          Original answer



          Macs are unusual in this regard. The default $PATH variable for a regular user looks like this:



          /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


          By putting /usr/local/bin after /usr/bin and /bin, Mac upends the usual system. Normally, you can put something into /usr/local/bin (say a second Perl interpreter, compiled in some non-standard way), and then a regular user will hit the custom one rather than the system-wide one first. This is good. Users can get variants, but the system stays pure. Given Apple’s default $PATH, however, items in /usr/bin or /bin will get found before anything in /usr/local/bin. (This basically defeats the purpose of installing, e.g., the custom Perl in /usr/local/bin.)



          To fix this, you can change the regular user's $PATH by editing the .profile file in the user's home directory. (That file may not exist, if you have a brand-new install. In that case, create it.)



          Semi-related: Homebrew provides excellent package management for Macs. By default, Homebrew installs software into /usr/local, but it does so in a way that makes it very easy to remove things and return to a vanilla state later.






          share|improve this answer



















          • 1




            On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
            – Legolas
            Nov 30 at 15:15






          • 1




            @Legolas Apple appears to have changed how they handle this. I'll edit the post.
            – Telemachus
            Dec 1 at 15:21













          up vote
          38
          down vote



          accepted







          up vote
          38
          down vote



          accepted






          Core answer: you probably want /usr/local/bin. Depending on how recent your macOS is, you may need to update your default $PATH. See below for further details.



          UPDATE 12-01-2018 At some point since I wrote my original answer, Apple changed its default $PATH. As a result, a lot of what I say below is irrelevant to recent Macs. If you type echo $PATH in a terminal, and /usr/local/bin is first, then you can ignore everything below about changing your $PATH.



          Original answer



          Macs are unusual in this regard. The default $PATH variable for a regular user looks like this:



          /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


          By putting /usr/local/bin after /usr/bin and /bin, Mac upends the usual system. Normally, you can put something into /usr/local/bin (say a second Perl interpreter, compiled in some non-standard way), and then a regular user will hit the custom one rather than the system-wide one first. This is good. Users can get variants, but the system stays pure. Given Apple’s default $PATH, however, items in /usr/bin or /bin will get found before anything in /usr/local/bin. (This basically defeats the purpose of installing, e.g., the custom Perl in /usr/local/bin.)



          To fix this, you can change the regular user's $PATH by editing the .profile file in the user's home directory. (That file may not exist, if you have a brand-new install. In that case, create it.)



          Semi-related: Homebrew provides excellent package management for Macs. By default, Homebrew installs software into /usr/local, but it does so in a way that makes it very easy to remove things and return to a vanilla state later.






          share|improve this answer














          Core answer: you probably want /usr/local/bin. Depending on how recent your macOS is, you may need to update your default $PATH. See below for further details.



          UPDATE 12-01-2018 At some point since I wrote my original answer, Apple changed its default $PATH. As a result, a lot of what I say below is irrelevant to recent Macs. If you type echo $PATH in a terminal, and /usr/local/bin is first, then you can ignore everything below about changing your $PATH.



          Original answer



          Macs are unusual in this regard. The default $PATH variable for a regular user looks like this:



          /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


          By putting /usr/local/bin after /usr/bin and /bin, Mac upends the usual system. Normally, you can put something into /usr/local/bin (say a second Perl interpreter, compiled in some non-standard way), and then a regular user will hit the custom one rather than the system-wide one first. This is good. Users can get variants, but the system stays pure. Given Apple’s default $PATH, however, items in /usr/bin or /bin will get found before anything in /usr/local/bin. (This basically defeats the purpose of installing, e.g., the custom Perl in /usr/local/bin.)



          To fix this, you can change the regular user's $PATH by editing the .profile file in the user's home directory. (That file may not exist, if you have a brand-new install. In that case, create it.)



          Semi-related: Homebrew provides excellent package management for Macs. By default, Homebrew installs software into /usr/local, but it does so in a way that makes it very easy to remove things and return to a vanilla state later.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 1 at 15:53

























          answered Jul 17 '09 at 14:55









          Telemachus

          5,1652030




          5,1652030








          • 1




            On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
            – Legolas
            Nov 30 at 15:15






          • 1




            @Legolas Apple appears to have changed how they handle this. I'll edit the post.
            – Telemachus
            Dec 1 at 15:21














          • 1




            On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
            – Legolas
            Nov 30 at 15:15






          • 1




            @Legolas Apple appears to have changed how they handle this. I'll edit the post.
            – Telemachus
            Dec 1 at 15:21








          1




          1




          On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
          – Legolas
          Nov 30 at 15:15




          On my freshly installed OsX 10.13.6 (High Sierra), the path does contain /usr/local/bin first (even though the folder doesn't even exist) by default.
          – Legolas
          Nov 30 at 15:15




          1




          1




          @Legolas Apple appears to have changed how they handle this. I'll edit the post.
          – Telemachus
          Dec 1 at 15:21




          @Legolas Apple appears to have changed how they handle this. I'll edit the post.
          – Telemachus
          Dec 1 at 15:21












          up vote
          9
          down vote













          /usr/local/bin and /usr/local/sbin are well worth adding to your path, as a lot of makefiles for source builds are defaulted to install there.



          If you use MacPorts, it's worth adding /opt/local/bin and /opt/local/sbin as well.



          The best way to do this is to add



          export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH



          to the .bashrc file in your home directory (which is hidden, so the CLI is the best way to to do this), or, if you want to change the system wide path, add the same line to /etc/bashrc (not hidden), but you will need to sudo to do this.



          If you don't have a .bashrc in any user's home, you can make one and add this line to it, but remember to change the permissions on the file you create to make it readable by the user in question (obviously not relevant if you're doing it for your own profile).



          The $PATH at the end appends the system default path to whatever you put before. Note that the system searches for binaries in the order of paths given, so if you install a binary in /usr/local or /opt/local that is also installed by default on the system, the versions you install will be found first, which can (though rarely) upset things. It is worth watching out for.



          Good information is here.



          I should note that the above assumes you are using Bash for the shell, which is the default on Mac OS X v10.4 (Tiger) and Mac OS X v10.5 (Leopard), but not on earlier systems, which used tcsh instead, which has a different syntax.



          I hope that helps...






          share|improve this answer



















          • 1




            /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
            – Telemachus
            Jul 17 '09 at 15:13










          • well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
            – avstrallen
            Jul 17 '09 at 15:15






          • 1




            I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
            – avstrallen
            Jul 17 '09 at 15:18










          • "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
            – Jason S
            Jul 17 '09 at 15:32










          • No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
            – avstrallen
            Jul 17 '09 at 15:42















          up vote
          9
          down vote













          /usr/local/bin and /usr/local/sbin are well worth adding to your path, as a lot of makefiles for source builds are defaulted to install there.



          If you use MacPorts, it's worth adding /opt/local/bin and /opt/local/sbin as well.



          The best way to do this is to add



          export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH



          to the .bashrc file in your home directory (which is hidden, so the CLI is the best way to to do this), or, if you want to change the system wide path, add the same line to /etc/bashrc (not hidden), but you will need to sudo to do this.



          If you don't have a .bashrc in any user's home, you can make one and add this line to it, but remember to change the permissions on the file you create to make it readable by the user in question (obviously not relevant if you're doing it for your own profile).



          The $PATH at the end appends the system default path to whatever you put before. Note that the system searches for binaries in the order of paths given, so if you install a binary in /usr/local or /opt/local that is also installed by default on the system, the versions you install will be found first, which can (though rarely) upset things. It is worth watching out for.



          Good information is here.



          I should note that the above assumes you are using Bash for the shell, which is the default on Mac OS X v10.4 (Tiger) and Mac OS X v10.5 (Leopard), but not on earlier systems, which used tcsh instead, which has a different syntax.



          I hope that helps...






          share|improve this answer



















          • 1




            /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
            – Telemachus
            Jul 17 '09 at 15:13










          • well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
            – avstrallen
            Jul 17 '09 at 15:15






          • 1




            I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
            – avstrallen
            Jul 17 '09 at 15:18










          • "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
            – Jason S
            Jul 17 '09 at 15:32










          • No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
            – avstrallen
            Jul 17 '09 at 15:42













          up vote
          9
          down vote










          up vote
          9
          down vote









          /usr/local/bin and /usr/local/sbin are well worth adding to your path, as a lot of makefiles for source builds are defaulted to install there.



          If you use MacPorts, it's worth adding /opt/local/bin and /opt/local/sbin as well.



          The best way to do this is to add



          export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH



          to the .bashrc file in your home directory (which is hidden, so the CLI is the best way to to do this), or, if you want to change the system wide path, add the same line to /etc/bashrc (not hidden), but you will need to sudo to do this.



          If you don't have a .bashrc in any user's home, you can make one and add this line to it, but remember to change the permissions on the file you create to make it readable by the user in question (obviously not relevant if you're doing it for your own profile).



          The $PATH at the end appends the system default path to whatever you put before. Note that the system searches for binaries in the order of paths given, so if you install a binary in /usr/local or /opt/local that is also installed by default on the system, the versions you install will be found first, which can (though rarely) upset things. It is worth watching out for.



          Good information is here.



          I should note that the above assumes you are using Bash for the shell, which is the default on Mac OS X v10.4 (Tiger) and Mac OS X v10.5 (Leopard), but not on earlier systems, which used tcsh instead, which has a different syntax.



          I hope that helps...






          share|improve this answer














          /usr/local/bin and /usr/local/sbin are well worth adding to your path, as a lot of makefiles for source builds are defaulted to install there.



          If you use MacPorts, it's worth adding /opt/local/bin and /opt/local/sbin as well.



          The best way to do this is to add



          export PATH=/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH



          to the .bashrc file in your home directory (which is hidden, so the CLI is the best way to to do this), or, if you want to change the system wide path, add the same line to /etc/bashrc (not hidden), but you will need to sudo to do this.



          If you don't have a .bashrc in any user's home, you can make one and add this line to it, but remember to change the permissions on the file you create to make it readable by the user in question (obviously not relevant if you're doing it for your own profile).



          The $PATH at the end appends the system default path to whatever you put before. Note that the system searches for binaries in the order of paths given, so if you install a binary in /usr/local or /opt/local that is also installed by default on the system, the versions you install will be found first, which can (though rarely) upset things. It is worth watching out for.



          Good information is here.



          I should note that the above assumes you are using Bash for the shell, which is the default on Mac OS X v10.4 (Tiger) and Mac OS X v10.5 (Leopard), but not on earlier systems, which used tcsh instead, which has a different syntax.



          I hope that helps...







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 14 '15 at 4:05









          Peter Mortensen

          8,326166184




          8,326166184










          answered Jul 17 '09 at 15:10









          avstrallen

          52047




          52047








          • 1




            /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
            – Telemachus
            Jul 17 '09 at 15:13










          • well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
            – avstrallen
            Jul 17 '09 at 15:15






          • 1




            I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
            – avstrallen
            Jul 17 '09 at 15:18










          • "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
            – Jason S
            Jul 17 '09 at 15:32










          • No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
            – avstrallen
            Jul 17 '09 at 15:42














          • 1




            /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
            – Telemachus
            Jul 17 '09 at 15:13










          • well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
            – avstrallen
            Jul 17 '09 at 15:15






          • 1




            I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
            – avstrallen
            Jul 17 '09 at 15:18










          • "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
            – Jason S
            Jul 17 '09 at 15:32










          • No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
            – avstrallen
            Jul 17 '09 at 15:42








          1




          1




          /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
          – Telemachus
          Jul 17 '09 at 15:13




          /usr/local/bin is already in a default OS X $PATH (though too late - see my answer). If you use MacPorts, its installer should edit your path as necessary - at least it always has in my experience. That said, it's good for users to know what it's doing (and why).
          – Telemachus
          Jul 17 '09 at 15:13












          well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
          – avstrallen
          Jul 17 '09 at 15:15




          well spotted @Telemachus: whenever I build a Mac for myself, I customise the hell out of the path first thing, so I can never remember what's standard and what's mine!
          – avstrallen
          Jul 17 '09 at 15:15




          1




          1




          I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
          – avstrallen
          Jul 17 '09 at 15:18




          I know what you're daying about the MacPorts installer customising the paths in .profile, but I have had an occasion in the past when for some reason, I know not what, this failed to stick (which confused the hell out of me for quite a while!)... so since then I tend to wire it in by hand...
          – avstrallen
          Jul 17 '09 at 15:18












          "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
          – Jason S
          Jul 17 '09 at 15:32




          "which is hidden, so the CLI is the best way to to do this": dumb question, how do you run TextEdit on a file from the command prompt?
          – Jason S
          Jul 17 '09 at 15:32












          No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
          – avstrallen
          Jul 17 '09 at 15:42




          No such thing as a dumb question: use the open command with the filename as an argument and it should open with whatever is set as the default text editor (TextEdit as standard).
          – avstrallen
          Jul 17 '09 at 15:42










          up vote
          7
          down vote













          I tend to go with /usr/local. Here's a nice explanation why, which refers to Filesystem Hierarchy Standard (FHS).⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢, which in turn says about /usr/local:




          Tertiary hierarchy for local data, specific to this host. Typically
          has further subdirectories, e.g., bin, lib, share.⁢







          share|improve this answer























          • Yep, it's pretty much the same as other *nix operating systems in that regard.
            – jtbandes
            Jul 24 '09 at 17:29






          • 1




            Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
            – DavidPostill
            Nov 15 '16 at 11:53















          up vote
          7
          down vote













          I tend to go with /usr/local. Here's a nice explanation why, which refers to Filesystem Hierarchy Standard (FHS).⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢, which in turn says about /usr/local:




          Tertiary hierarchy for local data, specific to this host. Typically
          has further subdirectories, e.g., bin, lib, share.⁢







          share|improve this answer























          • Yep, it's pretty much the same as other *nix operating systems in that regard.
            – jtbandes
            Jul 24 '09 at 17:29






          • 1




            Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
            – DavidPostill
            Nov 15 '16 at 11:53













          up vote
          7
          down vote










          up vote
          7
          down vote









          I tend to go with /usr/local. Here's a nice explanation why, which refers to Filesystem Hierarchy Standard (FHS).⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢, which in turn says about /usr/local:




          Tertiary hierarchy for local data, specific to this host. Typically
          has further subdirectories, e.g., bin, lib, share.⁢







          share|improve this answer














          I tend to go with /usr/local. Here's a nice explanation why, which refers to Filesystem Hierarchy Standard (FHS).⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢, which in turn says about /usr/local:




          Tertiary hierarchy for local data, specific to this host. Typically
          has further subdirectories, e.g., bin, lib, share.⁢








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 30 at 15:49









          Legolas

          375311




          375311










          answered Jul 17 '09 at 14:47









          John Topley

          68331322




          68331322












          • Yep, it's pretty much the same as other *nix operating systems in that regard.
            – jtbandes
            Jul 24 '09 at 17:29






          • 1




            Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
            – DavidPostill
            Nov 15 '16 at 11:53


















          • Yep, it's pretty much the same as other *nix operating systems in that regard.
            – jtbandes
            Jul 24 '09 at 17:29






          • 1




            Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
            – DavidPostill
            Nov 15 '16 at 11:53
















          Yep, it's pretty much the same as other *nix operating systems in that regard.
          – jtbandes
          Jul 24 '09 at 17:29




          Yep, it's pretty much the same as other *nix operating systems in that regard.
          – jtbandes
          Jul 24 '09 at 17:29




          1




          1




          Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
          – DavidPostill
          Nov 15 '16 at 11:53




          Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
          – DavidPostill
          Nov 15 '16 at 11:53


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f7150%2fmac-os-x-conventional-places-where-binary-files-should-live%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]