DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far...

Welcome! This is a Q&A website for computer programmers and users alike, focused on helping fellow programmers and users. Read more

What are you stuck on? Ask a question and hopefully somebody will be able to help you out!
0 votes

I would like to move all the content of my home folder to an external drive to preserve the SSD from too many reads and writes when downloading stuff. Would it be safe to just move everything to /mnt/T/home and symlink with ln -s /mnt/T/home /home/user? The hard drive is configured to mount on system startup. I don't know if this would generate issues with any program that may refuse to follow symlinks.

Maybe it's safer to create a home partition and move it?

edited by

2 Answers

0 votes
Best answer

Edit: I don't recommend doing this as it affected greatly the response time of the system. I had to reverse the changes.

You change terminal with Ctrl+Alt+2. Log as root and then do

pkill -KILL -u user
usermod --home /mnt/T/home user

Then remove the home folder and link it

sudo rm -rf /home/user
sudo ln -s /mnt/T/home /home/user

Alternatively you could move your home directory to a partition of your external drive and mount it at /home/user. This can be achieved automatically by adding an entry to the /etc/fstab file (assuming /dev/sdb1 is the partition of your external drive with an ext4 file system, adjust to your needs):

/dev/sdb1  /home/user  ext4  defaults  0  1

After saving the file, either reboot or mount the file system using mount /home/user.

See fstab(5) for more mount options.

Edit: the first solution above ended up giving me some trouble. I ended up following this solution.

selected by
0 votes

You can surely symlink it but I won't recommend it "in the field" because the symlink is going to give you issues at one point or another. Instead you should mount your new path directly onto /home/your-user. You don't even have to remove the existing home, just mount over it. You can mount it temporarily, or you can mount it permanently with /etc/fstab.

Contributions licensed under CC0