Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in setting up my machine so that I can try different distributions of Linux. I want to always be running Ubuntu (10.04.3), but would then try other distros in a dual-boot setting.

Since the file hierarchy will be similar, I am wondering if the programs that I install and the settings in Ubuntu will work on the 2nd/test distro side?

If so, does it make sense to mount /opt, /usr /etc /var each on a separate partition so that I can then mount the same files in the corresponding folders the 2nd/test distro side?

Is it worth it to try to use these files in both systems simutaneously? Or is it easier just to change settings and re-download programs in each system? If yes, why? If no, why not?

I am speculating that it will depend heavily on the distro, so if that is the case, then answer the question for:

  • Linux Mint, and
  • all other Debian based distros.

(ie, "would this work for all Debian based systems?" -- I am not looking for an answer for each one.)

Update by OP:

  1. It was dumb to suggest moving /etc to a separate partition: According to the Ubuntu documentation, the root partition must always contain /etc or else you can't boot.
share|improve this question
Assuming it worked well: If you replace the 2nd distros programs and settings by Ubuntu's, you won't be running that second distro, you'd be essentially running Ubuntu with that distro's kernel. – Mat Nov 22 '11 at 19:38
up vote 4 down vote accepted

You can run programs from another distribution. However, not all programs will run straight out of the box. A number of programs need files in a specific place or on the search path, that your main distribution might not provide or might provide in a version that isn't suitable. For example, if a program needs a particular library that's only in /otherdistribution/usr/lib, it won't find that library unless you tell it where (LD_LIBRARY_PATH=/otherdistribution/usr/lib /otherdistribution/usr/bin/someprogram). Or if a program is looking for its data files in /usr/share/myprogram, you need to tell it to look in /otherdistribution/usr/share/myprogram somehow.

If you want to run a distribution and occasionally run programs from another distribution (or another version of that same distribution, say Debian stable and Debian testing), the easiest approach is to access other distributions through chroot. And the easiest way to do that on Debian-based distributions is through schroot (you may find this guide to setting up a schroot useful).

share|improve this answer

For /opt it makes sense, for the other's not. Just compare library versions and your /etc directories' layout.

In fact with /opt I did more or less the same. My /opt directory had withstanded several distro upgrades and changes. Although every now and then you might need to fiddle around.

share|improve this answer
This is what I will do. – Brian Dant Nov 22 '11 at 21:25

It depends on the application, how it was linked (static or dynamic) and wether all relevant files are placed within reach of the application folder.

Use ldd on the binaries/libraries of the application to see the dependencies. No dependency should be shown as "missing". If you have a lot of specific dependencies live gets harder.

share|improve this answer

Your Answer


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.