Let's say I have a disk with 2 -identical- ubuntu installs on 2 different partitions.

I want to be able to install packages to a location (third partition, shared between both) where both ubuntus are able to run them.

Is this possible? From what i'm reading, sharing /usr is a no no when more than one distro is involved, but would there be a problem if the distros sharing it were the same?

If having a shared /usr is a problem, would having a shared /usr/local allow me to install packages with apt on one ubuntu and use them on the other?

  • 2
    This is more complicated than it sounds. First, a software package does not only consist of files in /usr but may also have stuff in /lib, /bin or /etc for example. You can not just reuse half the files, that does not work. And /usr/local is not used by the package manager at all. It is for apps installed without the package manager. – Byte Commander Aug 2 '17 at 22:59

What you are trying to do is certainly possible and done in the development industry often. This makes it much easier to manager large amounts of users and keep them up to date and using the exact same development tools.

Usually the applications and associated libraries are installed on a network mounted filesystem. The directory containing the executables is then added to the user PATH in their .bashrc or .profile.

These applications in this shared filesystem are hand built and installed in the specific shared location. I personally have not tried using a package manager for installations to a specific directory, it may be possible with some research.

Usually these tools are executed via the command line. If so inclined you could create shortcuts and application menu entries to get the full native experience.

I don't see why you couldn't use a local partition instead of a network mount. The overhead of all this might be a little over kill for just one user though. As previously mentioned, an application installation may not exist in one specific location with a single binary. You will have to carefully make sure all dependencies can be resolved from within that shared location.

|improve this answer|||||
  • Thanks, I was afraid i'd have to pretty much build every application manually. Using the package manager was just a luxury I was hoping to have. – rguessford Aug 3 '17 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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