Sharing SWAP and /home beteween Ubuntu 15.10 and Kali Linux 2.0
Solution 1
Yes, you can use one swap partition for several Linux operating systems.
There is an exception, in case want to hibernate, you cannot share a swap partition.Yes, it is possible but not recommended, better create separate partitions.
There you can store your personal data and you can access them from every system.
Below an example of a convenient disk partition setup for being used by multiple systems :
As you can see in the screenshots, the data partitions are separated from the system partitions.
They can be accessed from every operating system, in this case from non-Linux systems as well.
sdb is used for operating systems : sdb3 contains the Ubuntu system, sdb4 contains virtual disks.
sda is used for everything external : sda1 contains personal data, sda2 music, photos and videos.
sda3 contains backups of data and operating systems, sda4 (bootable) ISO files and various tools.
This is only a suggestion, of course, you should create partitions suitable for your personal needs.
Solution 2
Sharing swap will mean you can't hibernate but that's the only real downside.
Sharing a common /home
can be a bad idea. You have different versions of the same applications writing their settings all over the place. Something is bound to explode at some point.
I'd avoid it and instead set up a shared data partition that you mount and/or symlink into each home to supplant things like ~/Documents
, ~/Music
, etc.
Related videos on Youtube
![Severus Tux](https://i.stack.imgur.com/aaqfZ.png?s=256&g=1)
Comments
-
Severus Tux almost 2 years
I am currently running Ubuntu-15.10 on my machine and I am planning to install KaliLinux alongside Ubuntu. I would like to know 2 things before I proceed.
(As both Questions are related and similar, I included both in same question)
- Can I have Only 1 (current) Swap partition for both?
Should I create 2 different swap partitions 1 for each? Or can I use the existing Swap partition as a common Swap?
- Can I use the same
/home
Partition for both?
I have an 25GB separate partition for
/home
on my Ubuntu. It would be amazing if I could share the same/home
for both the O.S so that changes made in one will be reflected in the otherAnd I will follow these (if required):
- I will use the Exact same username if both the O.S
- I will create one and only one user in both the O.S
- Permission of
/home
will be set to 777 always
I am aware that During the installation of the 2nd OS, if I tick ☑ on
/home
instructing it to use the current partition, It will be formatted once. But will this effect Ubuntu?Note : I am not having an encrypted
/home
-
Severus Tux over 8 yearsInteresting... :-) Could you please provide more explanation about setting up a shared data partition? or a link.. Thanks :D
-
Oli over 8 yearsIt's just a partition with files on it. The naming and layout is completely up to you.
-
Rinzwind over 8 years@oli symlink is bugged with Nautilus (files in Desktop do not get moved to trash when you delete them and error out). Just create 2 homes (1 for each) and change
user-dirs.dirs
to point to a /data/ partition -
Joe over 8 yearsAs Oli says, sharing /home sounds a lot better than it actually is. I tried it between 2 versions of the same distro - kubuntu - and had things go a bit crazy. One other thing to note: /home isn't the only issue. I currently dual boot between 12.04 and 15.04 which use different versions of grub. Every time I get a kernel update in one, it updates a grub menu that the other one doesn't look at. Have to keep fixing it manually or rewriting the mbr.