Which is better for installed applications: /usr/bin or user's home directory?
Clash Royale CLAN TAG#URR8PPP
up vote
9
down vote
favorite
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?
software-installation directory-structure
add a comment |Â
up vote
9
down vote
favorite
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?
software-installation directory-structure
add a comment |Â
up vote
9
down vote
favorite
up vote
9
down vote
favorite
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?
software-installation directory-structure
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?
software-installation directory-structure
edited Dec 25 '12 at 22:19
Gilles
503k1179941519
503k1179941519
asked Dec 25 '12 at 19:51
TheAmpersand
4613
4613
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
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
add a comment |Â
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.
/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
add a comment |Â
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
.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
edited Dec 25 '12 at 21:13
jippie
8,51172955
8,51172955
answered Dec 25 '12 at 20:26
dastergon
1794
1794
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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.
/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
add a comment |Â
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.
/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
add a comment |Â
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.
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.
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
add a comment |Â
/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
add a comment |Â
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
.
add a comment |Â
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
.
add a comment |Â
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
.
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
.
answered Dec 25 '12 at 19:55
Ignacio Vazquez-Abrams
31.9k66780
31.9k66780
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Dec 28 '12 at 1:41
MIrra
7352820
7352820
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password