1

I know that with a GNU/Linux distribution you can switch between different distributions at runtime when they use the same kernel or the kernel is compatible between 2 or more different distributions; I never used this feature of the Linux-based OSs, but I would like to ask what is the software/s that makes this possible and how to perform this switch at runtime correctly.

It will be nice to also have a list of pros and cons, for example what settings I loose and what I can keep during the switch.

Zelda
  • 6,262
  • 1
  • 23
  • 28
user2485710
  • 1,493

1 Answers1

2

Generally speaking, this is virtualization, which can take many forms. One OS is running on the physical hardware, and the other OSes are running in a more or less virtual environment.

If you want to run very different operating systems (for example Linux and Windows), run one of them in a virtual machine.

At the other extreme, if you want to have access to programs from several distributions (for example a stable distribution and a bleeding edge distribution), all running the same kernel, you can install one of the distributions in a directory subtree and run its programs inside the directory subtree thanks to the chroot command. For an example of how to do this on Debian, Ubuntu and derivatives, see How do I run 32-bit programs on a 64-bit Debian/Ubuntu?

Linux offers more complex features to run multiple Linux systems off the same kernel: LXC, namespaces, …