Dummy Linux user for installing programs

0

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.

Archit

Posted 2012-05-28T16:51:06.250

Reputation: 111

Answers

2

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.

Cristian Ciupitu

Posted 2012-05-28T16:51:06.250

Reputation: 4 515