Different linux distros sharing the same /home folder?
It certainly is possible to share a home folder (or partition) over different linux distributions.
But take the following notes:
- UID and GID must be the same on each distributions for the certain user(s).
- (as already pointed out) different configuration files for the same programs could result in unexpected behavior.
- If you install all distributions onto the same boot folder, make sure that the bootloader handles the different distributions correctly.
I have a working (virtual) setup:
/dev/sda (40GB)
+-/dev/sda1 /boot (100MB, ext2)
+-/dev/sda3 swap (2GB)
+-/dev/sda4 /home (20GB, ext4)
+---/dev/sda5 /root (Ubuntu 10.04, 5GB, ext4)
+---/dev/sda6 /root (Fedora 14, 5GB, ext4)
+---/dev/sda7 /root (openSUSE 11.3, 5GB, ext4)
+---/dev/sda8 /root (ArchLinux 2010.05, 5GB, ext4)
Ubuntu and Fedora both run Gnome 2.30, openSUSE has KDE4 and ArchLinux LXDE. All distributions have their necessary boot files on one partition. Switching between the distributions provides a persistent user configuration like intended.
The other possibility would be a lightweight home folder (doesn't have to be a whole partition) for each of the distributions, only providing the necessary configuration files (.gnome2, .kde4, .compiz, .themes, etc.) and a shared data partition with the "heavy" stuff (documents, pictures, videos, music, etc.). Symbolic links in each of the distributions own home folder would then point to the shared partition.
Afterwards, this can be expanded at will to include other stuff as well.
Example: You have eclipse
IDE installed on all distributions and want the same configuration and source files available everywhere. You can create symbolic links on each distributions home folder to the shared one to achieve this.
This would be Ubuntu:
$ ls -l /home/user
.eclipse -> /mnt/shared/.eclipse
.gnome2
Documents -> /mnt/shared/Documents
workspace -> /mnt/shared/workspace
...
And openSUSE:
$ ls -l /home/user
.eclipse -> /mnt/shared/.eclipse
.kde4
Documents -> /mnt/shared/Documents
workspace -> /mnt/shared/workspace
...
And so on..
If you're not sure about interfering configuration files, try the second, safer way and find out which home components can be shared easily between the installed distributions.
I would not recommend sharing your /home
between radically different distributions. Two versions of the same program reading and writing the same config files could result in problems, e.g. if the newer version writes something that the older version does not understand.
If you don't mind the paths being different, save your files in the /home
for one distro and mount that /home at another location on the other distro (such as /home/<user>/fedora
). Then, /home/<user>/foo/bar
can be accessed via /home/<user>/fedora/foo/bar
on arch, for example.
If you want the paths to be the same, save most of your files to a third, distinct partition, and mount it in the same place within both distributions e.g. /home/<user>/stuff
.
You can use symlinks
ln -s /mnt/mydisk/mydocuments /home/user4123/mydocuments
On each distro once. Now each distro has it's own configuration files