Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search

1. Introduction

As a developer, there is occasionally a need to code and/or test programs on multiple Linux distributions. This mini-howto outlines a neat chroot trick that can, in many cases, obviate the need to reboot into different Linux distributions to do testing or development.

In a nutshell, the "trick" is to place all the files from a particular linux distribution into a single directory and then chroot into that directory to develop/test/debug your program. This approach will work provided that:

  1. The kernel version of the "main" or "primary" distribution that you are running is (at least somewhat) compatible with the "secondary" or chroot'ed distributions, and

  2. Your application is primarily user-space (ie. no kernel modules) and does not depend intimately on any particular kernel features (ie. /proc behavior).