Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a separate home partition, so I want to install some software from source in a different hierarchy – not in my user account, preferably in /home.

To rephrase, let's say I have my home directory in /home/myuser and I want my new hierarchy (i.e. /bin, /lib, /include, /share, /local, /src nested in a dummy user's directory – say /home/myprograms so that all the software I install from source or just want to install away from /usr can reside in a separate directory.

I can install programs in that directory, but how do I make those programs available to all users on my PC?

If anyone has a different suggestion for maintaining two hierarchies, please also leave a comment.

share|improve this question
add comment

1 Answer

The convention for 3rd party programs is to install them under /usr/local which is will make them available to other users (on most distributions).

You could of course use any other directory such as /home/myuser, but you'll have to update the PATH environment variable. You can do this by creating /etc/profile.d/mypath.sh with the following content:

PATH="/home/myuser/bin:$PATH"

Another choice would be installing them under /opt using a subdirectory for each program like this: /opt/foo/{bin,lib,share}, /opt/bar/{bin,lib,share} and so on. This has the advantage of being able to quickly remove or copy a program's installation, but it has the disadvantage of having everything split up into multiple places, so you'll have to add multiple directories to PATH.

For more details read the Filesystem Hierarchy Standard.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.