How do you set up your $HOME?

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
316
Credits
3,611
My machines are multi-boot setups. Rhetorical question: How do *I* set set them up to share my data?
My requirements:
* Each OS instance should share my data.
* I don't want each instance to share OS specific configurations. Simply setting up a home partition tends to break application configurations, especially when the operating systems or apps are different, either in version or type.

My solution:
* I keep all my user data on a separate partition, that mimicks a home directory.
* The partition contains common directories like Desktop, Downloads, Documents, Music, Pictures, and Videos. It also houses my bin directory, .bashrc, and .bash_aliases. But nothing else; things like .config and .cache do not live here.

The setup:
* When I install a new OS, I keep the /home directory on the system partition.
* I create a MyData directory within my user home directory, e.g. /home/SlowCoder/MyData. This directory is permanently mounted to my data partition in /etc/fstab. NOTE: After editing fstab, you'll want to restart to ensure the directory is mounted.
* Now that MyData contains ... well ... my data, I can connect my everything up into a seamless operation. I delete each of the aforementioned from my actual home directory. Then I create a symlink to each directory in MyData. I also symlink my .bashrc and .bashrc_aliases.

I keep a small script in my bin directory to make all this quick:
Code:
rmdir ~/Desktop; ln -s ~/MyData/Desktop ~/Desktop
rmdir ~/Documents; ln -s ~/MyData/Documents ~/Documents
rmdir ~/Downloads; ln -s ~/MyData/Downloads ~/Downloads
rmdir ~/Music; ln -s ~/MyData/Music ~/Music
rmdir ~/Pictures; ln -s ~/MyData/Pictures ~/Pictures
rmdir ~/Videos; ln -s ~/MyData/Videos ~/Videos
ln -s ~/MyData/bin ~/bin
mv ~/.bashrc ~/.bashrc.orig; ln -s ~/MyData/.bashrc ~/.bashrc
mv ~/.bashrc_aliases ~/.bashrc_aliases.orig; ln -s ~/MyData/.bashrc_aliases ~/.bashrc_aliases
Note, that it backs up the original .bashrc* files, so you can revert if needed.

Once complete, a simple logout/login should result in seamless access to my shared data, while keeping the shared data uncluttered by configuration and other OS files.

So, go on. Tell me how you set up your $HOME?
 


KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,139
Reaction score
6,986
Credits
66,089
I used to keep it on its own partition and just keep that backed up, but these days I don't even bother putting it on its own partition. I do keep it backed up, however. I don't worry about it. I haven't broken my computer to the point where I couldn't trivially fix it in quite a long time. Even if I do, I can always recover home. I only backup because of the risk of drive failure.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,606
Reaction score
4,685
Credits
34,139
My /home currently site where it is supposed to sit...the installer makes sure of that.

There was a time when I was toying with the idea of moving /home to a separate drive. This was aimed at making the installation of a fresh upgrade etc simpler.

As much as I dislike the idea of setting up an OS again/ configs etc...., it does have its advantages...out with the old/corrupted etc and in with the new. Start completely fresh.

In time, I may see a simple, straightforward process on here to move the /home. To date, I have not seen such a process that I am comfortable with.
 
OP
SlowCoder

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
316
Credits
3,611
I used to keep it on its own partition and just keep that backed up, but these days I don't even bother putting it on its own partition.
Do you use a multi-boot setup, where you're sharing the data across multiple installs on the same machine?
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,139
Reaction score
6,986
Credits
66,089
I don't multiboot anything. If I need data transferred, there are all sorts of ways to do so.

I've never really been into multibooting. One OS per device is fine - and I have VMs if I want to test something.
 

dancaer69

New Member
Joined
Mar 10, 2020
Messages
14
Reaction score
6
Credits
109
I also have a multiboot system and many years ago I decided to use a separate /home partition. So, I have a 500G partiton as /home. There there is a directory in which I have general data stuff, linux applications which are portable, a bin directory with scripts, appimages and directories for images/videos/music/documents. In every linux installation I use a different username with the name or the part of the name of distro as suffix(e.g userdeb). After an installation I only mount using fstab the directories for the images/videos/music/documents from the general directory to replace the default(empty) directories in /home/username.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,336
Reaction score
3,939
Credits
38,911
I keep my /home as default, I just always have an nfs share mounted where I save all my personal data, I usually never reinstall and I don't multi-boot.
 

wizwanabe

Member
Joined
May 9, 2017
Messages
54
Reaction score
78
Credits
325
@f33dm3bits has the right idea in post #7. Have a separate NAS or NFS share mounted for information you want to share with other computers in your system. This way each computer has access to the same information.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Staff online


Top