Move user folders to another drive on linux(Kubuntu/Ubuntu)

Move user folders to another drive on linux(Kubuntu/Ubuntu)

If you are using Linux (Kubuntu/ Ubuntu) and want to move individual personal folders such as Downloads, Documents, and Desktop to a different drive or even a different location — for example, to keep the root partition clean or take advantage of a larger secondary storage disk. This post explains how to do this cleanly using symbolic links (symlinks), which are fully respected by Dolphin and KDE applications.

Unlike Windows, where the location of user folders can be changed via folder properties, Linux requires a combination of filesystem and configuration tweaks. Let’s walk through the steps to achieve this setup effectively.

Prerequisites

  • A second internal or external drive already partitioned and formatted (e.g., ext4).
  • The drive should be mounted automatically on boot, such as at /mnt/data.
  • Your user should have write access to the mounted location.

Step 1: Mount the Secondary Drive Permanently

*Ignore if you have already mounted the required location

First, find your drive's UUID:

sudo blkid


Edit /etc/fstab and add an entry like below to auto-mount it at boot:

UUID=xxxx-xxxx  /mnt/data  ext4  defaults  0  2

Step 2: Create Target Folders on the New Drive

*Ignore if you have already targeted folder at the required location
mkdir -p /mnt/data/Downloads
mkdir -p /mnt/data/Documents
mkdir -p /mnt/data/Desktop
sudo chown -R $USER:$USER /mnt/data

Step 3: Move Existing Folder Contents

Optionally, move your files from the old folders to the new locations:

mv ~/Downloads/* /mnt/data/Downloads/
mv ~/Documents/* /mnt/data/Documents/
mv ~/Desktop/* /mnt/data/Desktop/

Step 4: Remove Default User Folders

To prevent KDE from reverting the changes, remove the default folders:
*Be CAUTION, as you will be deleting these folders, so make sure you backup your data if you have skipped the previous step.

rm -r ~/Downloads ~/Documents ~/Desktop

Now, create symbolic links pointing from your home directory to the new locations:

ln -s /mnt/data/Downloads ~/Downloads
ln -s /mnt/data/Documents ~/Documents
ln -s /mnt/data/Desktop ~/Desktop

These links will appear as normal folders to KDE apps and work seamlessly with Dolphin.


Conclusion

By using symbolic links, you can cleanly relocate important user folders like Downloads, Documents, and Desktop to a different drive in Kubuntu. This method is KDE-compatible, persistent across reboots, and does not interfere with system behavior or app integration.

If you found this guide useful or ran into any issues, feel free to leave a comment below!

Post a Comment

Previous Post Next Post