Which is better for installed applications: /usr/bin or user's home directory?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
9
down vote

favorite
1












It's not entirely clear to me whether it would be better to install a GUI application in /usr/bin or my home directory. I've read through this article and this one, but it doesn't really talk about philosophy of how to use these different directories. Should commands should be treated differently from GUI applications?







share|improve this question

























    up vote
    9
    down vote

    favorite
    1












    It's not entirely clear to me whether it would be better to install a GUI application in /usr/bin or my home directory. I've read through this article and this one, but it doesn't really talk about philosophy of how to use these different directories. Should commands should be treated differently from GUI applications?







    share|improve this question























      up vote
      9
      down vote

      favorite
      1









      up vote
      9
      down vote

      favorite
      1






      1





      It's not entirely clear to me whether it would be better to install a GUI application in /usr/bin or my home directory. I've read through this article and this one, but it doesn't really talk about philosophy of how to use these different directories. Should commands should be treated differently from GUI applications?







      share|improve this question













      It's not entirely clear to me whether it would be better to install a GUI application in /usr/bin or my home directory. I've read through this article and this one, but it doesn't really talk about philosophy of how to use these different directories. Should commands should be treated differently from GUI applications?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Dec 25 '12 at 22:19









      Gilles

      503k1179941519




      503k1179941519









      asked Dec 25 '12 at 19:51









      TheAmpersand

      4613




      4613




















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          11
          down vote













          The /usr/bin is the primary directory of executable commands on the system.



          The /usr/local:



          • Used by the system administrator when installing software
            locally.

          • It needs to be safe from being overwritten when the system

            software is updated.

          • It may be used for programs and data that are shareable amongst a
            group of hosts, but not found in /usr.

          Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



          More here.






          share|improve this answer






























            up vote
            7
            down vote













            There is no particular reason to make a difference between GUI and CLI commands.



            /usr/bin belongs to the operating system so, even while nothing prevents you, as root, to do it, you shouldn't put anything here. This directory is for people distributing software integrated with the OS and properly handling/avoiding name conflicts.



            /usr/local/bin is a common directory for locally built software. If you can write here, you can just use this directory.



            /opt/<name>/bin is for software not belonging to the OS. It is a good location for shared software.



            Your home directory belongs to you so you are free to put anything you like anywhere under it but it is not the best location if other people need to run your program.






            share|improve this answer

















            • 1




              So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
              – TheAmpersand
              Dec 31 '12 at 21:45











            • Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
              – jlliagre
              Jan 1 '13 at 9:02

















            up vote
            3
            down vote













            Do not install anything manually in /usr/bin. The whole of /usr, as well as /bin, /lib and /sbin, are reserved for software provided by your distribution. There is an exception: /usr/local, which is intended for programs installed by the system administrator and is not touched by package managers (except for creating a few directories). (That's on Linux, other unix variants may have package managers that install software under /usr/local.)



            Between /usr/local and a place in your home directory, the choice is yours. If you want a program to be available to all users, put it in /usr/local. If you want it to be available only for you, install it in your home directory.



            Whether the program has a GUI or not is irrelevant.






            share|improve this answer





















            • /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
              – Faheem Mitha
              Jan 21 '15 at 8:29

















            up vote
            2
            down vote













            If it makes sense (or is required) for the user to be able replace the binaries of the application then it must be installed in the user's home directory. Otherwise it can be installed in a public, read-only directory such as /usr/bin.






            share|improve this answer




























              up vote
              0
              down vote













              For global use you can install it to /usr/bin but nobody recommends that.



              For using some application as a specific user (it should be more secure, when running it as 1 user) install it to home directory of specific user.






              share|improve this answer





















                Your Answer







                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "106"
                ;
                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: false,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );








                 

                draft saved


                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f59412%2fwhich-is-better-for-installed-applications-usr-bin-or-users-home-directory%23new-answer', 'question_page');

                );

                Post as a guest






























                5 Answers
                5






                active

                oldest

                votes








                5 Answers
                5






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                11
                down vote













                The /usr/bin is the primary directory of executable commands on the system.



                The /usr/local:



                • Used by the system administrator when installing software
                  locally.

                • It needs to be safe from being overwritten when the system

                  software is updated.

                • It may be used for programs and data that are shareable amongst a
                  group of hosts, but not found in /usr.

                Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



                More here.






                share|improve this answer



























                  up vote
                  11
                  down vote













                  The /usr/bin is the primary directory of executable commands on the system.



                  The /usr/local:



                  • Used by the system administrator when installing software
                    locally.

                  • It needs to be safe from being overwritten when the system

                    software is updated.

                  • It may be used for programs and data that are shareable amongst a
                    group of hosts, but not found in /usr.

                  Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



                  More here.






                  share|improve this answer

























                    up vote
                    11
                    down vote










                    up vote
                    11
                    down vote









                    The /usr/bin is the primary directory of executable commands on the system.



                    The /usr/local:



                    • Used by the system administrator when installing software
                      locally.

                    • It needs to be safe from being overwritten when the system

                      software is updated.

                    • It may be used for programs and data that are shareable amongst a
                      group of hosts, but not found in /usr.

                    Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



                    More here.






                    share|improve this answer















                    The /usr/bin is the primary directory of executable commands on the system.



                    The /usr/local:



                    • Used by the system administrator when installing software
                      locally.

                    • It needs to be safe from being overwritten when the system

                      software is updated.

                    • It may be used for programs and data that are shareable amongst a
                      group of hosts, but not found in /usr.

                    Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.



                    More here.







                    share|improve this answer















                    share|improve this answer



                    share|improve this answer








                    edited Dec 25 '12 at 21:13









                    jippie

                    8,51172955




                    8,51172955











                    answered Dec 25 '12 at 20:26









                    dastergon

                    1794




                    1794






















                        up vote
                        7
                        down vote













                        There is no particular reason to make a difference between GUI and CLI commands.



                        /usr/bin belongs to the operating system so, even while nothing prevents you, as root, to do it, you shouldn't put anything here. This directory is for people distributing software integrated with the OS and properly handling/avoiding name conflicts.



                        /usr/local/bin is a common directory for locally built software. If you can write here, you can just use this directory.



                        /opt/<name>/bin is for software not belonging to the OS. It is a good location for shared software.



                        Your home directory belongs to you so you are free to put anything you like anywhere under it but it is not the best location if other people need to run your program.






                        share|improve this answer

















                        • 1




                          So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                          – TheAmpersand
                          Dec 31 '12 at 21:45











                        • Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                          – jlliagre
                          Jan 1 '13 at 9:02














                        up vote
                        7
                        down vote













                        There is no particular reason to make a difference between GUI and CLI commands.



                        /usr/bin belongs to the operating system so, even while nothing prevents you, as root, to do it, you shouldn't put anything here. This directory is for people distributing software integrated with the OS and properly handling/avoiding name conflicts.



                        /usr/local/bin is a common directory for locally built software. If you can write here, you can just use this directory.



                        /opt/<name>/bin is for software not belonging to the OS. It is a good location for shared software.



                        Your home directory belongs to you so you are free to put anything you like anywhere under it but it is not the best location if other people need to run your program.






                        share|improve this answer

















                        • 1




                          So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                          – TheAmpersand
                          Dec 31 '12 at 21:45











                        • Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                          – jlliagre
                          Jan 1 '13 at 9:02












                        up vote
                        7
                        down vote










                        up vote
                        7
                        down vote









                        There is no particular reason to make a difference between GUI and CLI commands.



                        /usr/bin belongs to the operating system so, even while nothing prevents you, as root, to do it, you shouldn't put anything here. This directory is for people distributing software integrated with the OS and properly handling/avoiding name conflicts.



                        /usr/local/bin is a common directory for locally built software. If you can write here, you can just use this directory.



                        /opt/<name>/bin is for software not belonging to the OS. It is a good location for shared software.



                        Your home directory belongs to you so you are free to put anything you like anywhere under it but it is not the best location if other people need to run your program.






                        share|improve this answer













                        There is no particular reason to make a difference between GUI and CLI commands.



                        /usr/bin belongs to the operating system so, even while nothing prevents you, as root, to do it, you shouldn't put anything here. This directory is for people distributing software integrated with the OS and properly handling/avoiding name conflicts.



                        /usr/local/bin is a common directory for locally built software. If you can write here, you can just use this directory.



                        /opt/<name>/bin is for software not belonging to the OS. It is a good location for shared software.



                        Your home directory belongs to you so you are free to put anything you like anywhere under it but it is not the best location if other people need to run your program.







                        share|improve this answer













                        share|improve this answer



                        share|improve this answer











                        answered Dec 25 '12 at 22:40









                        jlliagre

                        44.5k578122




                        44.5k578122







                        • 1




                          So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                          – TheAmpersand
                          Dec 31 '12 at 21:45











                        • Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                          – jlliagre
                          Jan 1 '13 at 9:02












                        • 1




                          So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                          – TheAmpersand
                          Dec 31 '12 at 21:45











                        • Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                          – jlliagre
                          Jan 1 '13 at 9:02







                        1




                        1




                        So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                        – TheAmpersand
                        Dec 31 '12 at 21:45





                        So is the only difference between /usr/local/bin and /opt/foo/bin where/how the software was installed? So as a rule, any software I manually install should go in the the former and anything installed from a package manager will end up in the later? EDIT: It appears so. link
                        – TheAmpersand
                        Dec 31 '12 at 21:45













                        Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                        – jlliagre
                        Jan 1 '13 at 9:02




                        Yes. Note that locally built software might also go to /opt/local/bin. This avoid an issue with /usr/local that much be writable while /usr might be mounted read-only.
                        – jlliagre
                        Jan 1 '13 at 9:02










                        up vote
                        3
                        down vote













                        Do not install anything manually in /usr/bin. The whole of /usr, as well as /bin, /lib and /sbin, are reserved for software provided by your distribution. There is an exception: /usr/local, which is intended for programs installed by the system administrator and is not touched by package managers (except for creating a few directories). (That's on Linux, other unix variants may have package managers that install software under /usr/local.)



                        Between /usr/local and a place in your home directory, the choice is yours. If you want a program to be available to all users, put it in /usr/local. If you want it to be available only for you, install it in your home directory.



                        Whether the program has a GUI or not is irrelevant.






                        share|improve this answer





















                        • /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                          – Faheem Mitha
                          Jan 21 '15 at 8:29














                        up vote
                        3
                        down vote













                        Do not install anything manually in /usr/bin. The whole of /usr, as well as /bin, /lib and /sbin, are reserved for software provided by your distribution. There is an exception: /usr/local, which is intended for programs installed by the system administrator and is not touched by package managers (except for creating a few directories). (That's on Linux, other unix variants may have package managers that install software under /usr/local.)



                        Between /usr/local and a place in your home directory, the choice is yours. If you want a program to be available to all users, put it in /usr/local. If you want it to be available only for you, install it in your home directory.



                        Whether the program has a GUI or not is irrelevant.






                        share|improve this answer





















                        • /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                          – Faheem Mitha
                          Jan 21 '15 at 8:29












                        up vote
                        3
                        down vote










                        up vote
                        3
                        down vote









                        Do not install anything manually in /usr/bin. The whole of /usr, as well as /bin, /lib and /sbin, are reserved for software provided by your distribution. There is an exception: /usr/local, which is intended for programs installed by the system administrator and is not touched by package managers (except for creating a few directories). (That's on Linux, other unix variants may have package managers that install software under /usr/local.)



                        Between /usr/local and a place in your home directory, the choice is yours. If you want a program to be available to all users, put it in /usr/local. If you want it to be available only for you, install it in your home directory.



                        Whether the program has a GUI or not is irrelevant.






                        share|improve this answer













                        Do not install anything manually in /usr/bin. The whole of /usr, as well as /bin, /lib and /sbin, are reserved for software provided by your distribution. There is an exception: /usr/local, which is intended for programs installed by the system administrator and is not touched by package managers (except for creating a few directories). (That's on Linux, other unix variants may have package managers that install software under /usr/local.)



                        Between /usr/local and a place in your home directory, the choice is yours. If you want a program to be available to all users, put it in /usr/local. If you want it to be available only for you, install it in your home directory.



                        Whether the program has a GUI or not is irrelevant.







                        share|improve this answer













                        share|improve this answer



                        share|improve this answer











                        answered Dec 25 '12 at 23:30









                        Gilles

                        503k1179941519




                        503k1179941519











                        • /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                          – Faheem Mitha
                          Jan 21 '15 at 8:29
















                        • /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                          – Faheem Mitha
                          Jan 21 '15 at 8:29















                        /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                        – Faheem Mitha
                        Jan 21 '15 at 8:29




                        /opt is also sometimes used for local installations, though the division between /usr/local and /opt is not clear.
                        – Faheem Mitha
                        Jan 21 '15 at 8:29










                        up vote
                        2
                        down vote













                        If it makes sense (or is required) for the user to be able replace the binaries of the application then it must be installed in the user's home directory. Otherwise it can be installed in a public, read-only directory such as /usr/bin.






                        share|improve this answer

























                          up vote
                          2
                          down vote













                          If it makes sense (or is required) for the user to be able replace the binaries of the application then it must be installed in the user's home directory. Otherwise it can be installed in a public, read-only directory such as /usr/bin.






                          share|improve this answer























                            up vote
                            2
                            down vote










                            up vote
                            2
                            down vote









                            If it makes sense (or is required) for the user to be able replace the binaries of the application then it must be installed in the user's home directory. Otherwise it can be installed in a public, read-only directory such as /usr/bin.






                            share|improve this answer













                            If it makes sense (or is required) for the user to be able replace the binaries of the application then it must be installed in the user's home directory. Otherwise it can be installed in a public, read-only directory such as /usr/bin.







                            share|improve this answer













                            share|improve this answer



                            share|improve this answer











                            answered Dec 25 '12 at 19:55









                            Ignacio Vazquez-Abrams

                            31.9k66780




                            31.9k66780




















                                up vote
                                0
                                down vote













                                For global use you can install it to /usr/bin but nobody recommends that.



                                For using some application as a specific user (it should be more secure, when running it as 1 user) install it to home directory of specific user.






                                share|improve this answer

























                                  up vote
                                  0
                                  down vote













                                  For global use you can install it to /usr/bin but nobody recommends that.



                                  For using some application as a specific user (it should be more secure, when running it as 1 user) install it to home directory of specific user.






                                  share|improve this answer























                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    For global use you can install it to /usr/bin but nobody recommends that.



                                    For using some application as a specific user (it should be more secure, when running it as 1 user) install it to home directory of specific user.






                                    share|improve this answer













                                    For global use you can install it to /usr/bin but nobody recommends that.



                                    For using some application as a specific user (it should be more secure, when running it as 1 user) install it to home directory of specific user.







                                    share|improve this answer













                                    share|improve this answer



                                    share|improve this answer











                                    answered Dec 28 '12 at 1:41









                                    MIrra

                                    7352820




                                    7352820






















                                         

                                        draft saved


                                        draft discarded


























                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f59412%2fwhich-is-better-for-installed-applications-usr-bin-or-users-home-directory%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?