I have been installing different distros on my pc based on their niche that I find valuable. I'd want to know how to install programs to a drive not containing the root for that version so I could use the programs on different versions. Is that possible? **For example, I have windows and I have my programs installed on a different hard-drive so If I'd be able to use most those programs on win7 or 10 if I had those on a different partitions.
Asked
Active
Viewed 227 times
0
-
Not a good idea. Different distros have different system libraries, policies, etc... which makes them hardly compatible. You may consider any distro like one mega-program with very extensible potential, but with a few options of integration with any other distro. – Danatela Feb 06 '15 at 09:14
2 Answers
1
If you install your programs "manually" (compiling them from source code, or downloading their binary distribution) simply leave them on a separate hard drive or partition as you do in windows, mount this partition to some specific path in your system (for example I usually have some subfolders in /mnt to mount external partitions) and add it to your PATH environment variable.

xoner
- 126
- 1
- 6
1
I think this is infeasible if not outright impossible, for the following reasons:
- Different distributions have different package managers. That means if you install a package from both of your OSes, you can get either two binaries in different folders (which defeats both your objective to save space and to have the same program on both), or one of the binaries overwriting the other. Binary packages are often built with different options for different distributions; this rarely causes problems but if it does you will not have any idea how to fix it or even what causes it.
- In Ubuntu, the packages have the locations for their files hard-coded in them. Putting them to different folders is possible, but you have to manually disassemble the package and copy the files where you wish. Some packages require multiple dependencies to be installed simultaneuously so the task can also get quite tedious. And even then, most programs look for their dependencies where they belong, and if you installed them into an alternate directory these programs will not run. You could circumvent this problem by softlinking the directories, though.
- You will have configuration and permission problems. Your user(s) will not necessarily have the same user ID on both OSes, and one system will expect some package files' permissions to be different than the other. Configuration file locations and even syntax can differ between distributions, causing you further headache. Also there are a lot more tiny differences that can break compatibility and are difficult or impossible to fix.
That being said, if you use a few pieces of software that are distribution-insensitive and not available from the package managers (for example games for Linux) and you use them on both distributions, you can install it on one partition and use it from both.

matega
- 73