In a linux machine, we may have to compile our programs with respect to that linux machine.Now, if we already have some other users (not root. A typical user.) who have already compiled many programs for this machine, is it possible to do something like this?For instance, user oldGuy got mpirun, python, and several other programs in his home directory, and he can invoke mpirun or any other binaries in his directory without having to type ./mpirun. Bash knows which binary he is referring to. He also has various other settings done.Now, suppose we have a new user called newGuy. If in our server, oldGuy already has compiled all the binaries that newGuy wanted, instead of having the newGuy wasting his time compiling programs that oldGuy already has and set everything correctly, can the newGuy inherit some binaries, settings, etc. from oldGuy?For example, oldGuy can simply invoke mpirun right from Bash, can newGuy do anything in order to be on the same page (all identical settings) with oldGuy right away, without having to compile the programs and set other settings, etc?
Applying and linking all settings/binaries of one user to another user in Linux
users;executable;path
When you execute a program by typing its name (with no directory part, e.g. just mpirun with possible arguments), the system looks for a file by that name in a list of directories called the program search path, or path for short. This path is determined by the environment variable PATH, which contains a colon-separated list of directories, for example /usr/local/bin:/usr/bin:/bin to look first in /usr/local/bin, then /usr/bin, then /bin.You can add directories to your search path. For example, if joe has installed some programs in his home directory /home/joe with the executables in /home/joe/bin, the following line adds /home/joe/bin at the end of the existing search path:PATH=$PATH:/home/joe/binIn most environments, for this setting to take effect, add the line to the file called .profile in your home directory. If that file doesn't exist, create it.If you log in in a graphical environment, depending on your environment and distribution, .profile may not be read. In this case, look in your environment's documentation or ask here, stating exactly what operating system, distribution and desktop environment you're running.If you log in in text mode (e.g. over SSH) and .profile isn't read but there is a file called .bash_profile, add the line to .bash_profile.