Reliable Way To Change Where Ubuntu Stores Your Default User Folders


📦 Change Where Ubuntu Stores New Data (Downloads, Documents, Pictures, etc.)



Here’s the clean, reliable way to change where Ubuntu stores your default user folders (Downloads, Documents, Pictures, Videos, etc.). This is the actual system‑level method Ubuntu uses — not app‑specific hacks.



Ubuntu uses the XDG user directories system to decide where apps save data by default. You can change these locations with one command.

Method 1 — Change Default Folders (Recommended)

Use this format:

bash
xdg-user-dirs-update --set NAME /absolute/path

Valid folder names (case‑sensitive):

  • DESKTOP

  • DOWNLOAD

  • DOCUMENTS

  • MUSIC

  • PICTURES

  • PUBLICSHARE

  • TEMPLATES

  • VIDEOS

Examples

✔ Change Downloads to another drive:

bash
xdg-user-dirs-update --set DOWNLOAD /mnt/Data/Downloads

✔ Change Pictures to a custom folder:

bash
xdg-user-dirs-update --set PICTURES /home/$USER/Images

✔ Change Documents to an external SSD:

bash
xdg-user-dirs-update --set DOCUMENTS /media/$USER/SSD/Documents

After running the command, log out and back in to apply changes.

📝 Method 2 — Edit the Config File Directly

Open:

bash
nano ~/.config/user-dirs.dirs

You’ll see lines like:

Code
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_PICTURES_DIR="$HOME/Pictures"

Change the paths, save, log out/in.

🌍 System‑Wide (All Users)

Edit:

bash
sudo nano /etc/xdg/user-dirs.defaults

But note: per‑user settings override this.

🧠 Important Notes

  • Paths must be absolute (/home/... or /mnt/...).

  • $HOME works in the config file but not in the command.

  • Apps that ignore XDG standards (rare) may need individual configuration.

Want to move all user folders to another drive?

I can generate a full script that:

  • Creates the new folders

  • Moves existing data

  • Updates XDG paths

  • Creates symlinks (optional)

  • Ensures permissions are correct

Just tell me the drive path (e.g., /mnt/Data).

/media/derek -samuel/KASPA-NODE

Perfect — since your target location is:

Code
/media/derek -samuel/KASPA-NODE

I’ll show you exactly how to point Ubuntu’s default user folders (Downloads, Documents, etc.) to that drive.

Below is the clean, correct way to do it without breaking permissions or apps.

📦 Set Ubuntu’s Default Save Locations to /media/derek -samuel/KASPA-NODE

Ubuntu uses XDG user directories, so you update them with:

bash
xdg-user-dirs-update --set NAME /absolute/path

Your path contains a space, so you must quote it.

✅ Example: Move Downloads to your external drive

bash
xdg-user-dirs-update --set DOWNLOAD "/media/derek -samuel/KASPA-NODE/Downloads"

If the folder doesn’t exist yet:

bash
mkdir -p "/media/derek -samuel/KASPA-NODE/Downloads"

📁 Other folders you can redirect

Here are the valid names and examples using your drive:

FolderCommand
Documentsxdg-user-dirs-update --set DOCUMENTS "/media/derek -samuel/KASPA-NODE/Documents"
Picturesxdg-user-dirs-update --set PICTURES "/media/derek -samuel/KASPA-NODE/Pictures"
Videosxdg-user-dirs-update --set VIDEOS "/media/derek -samuel/KASPA-NODE/Videos"
Musicxdg-user-dirs-update --set MUSIC "/media/derek -samuel/KASPA-NODE/Music"
Desktopxdg-user-dirs-update --set DESKTOP "/media/derek -samuel/KASPA-NODE/Desktop"

🔄 Apply the changes

Log out and back in. Apps will now save to the new locations automatically.

🧠 Want to move all user folders at once?

I can generate a ready‑to‑run script that:

  • Creates the folders on /media/derek -samuel/KASPA-NODE

  • Moves your existing data safely

  • Updates all XDG paths

  • Fixes permissions

  • Verifies the drive is mounted before login

Just tell me which folders you want moved (Downloads only, or everything).

I just need Kaspad moved

Got you — if the only thing you want to move is Kaspad, then we don’t touch your Ubuntu user folders at all. We simply relocate your Kaspad data directory (the blockchain, indexes, peers, etc.) to:

Code
/media/derek -samuel/KASPA-NODE

…and point Kaspad to it.

Below is the clean, safe way to do that.

🚀 Move Kaspad’s Data Directory to Your External Drive

Kaspad stores everything in a folder called ~/.kaspad unless you override it.

You want that moved to:

Code
/media/derek -samuel/KASPA-NODE/kaspad

Here’s the correct sequence.

1️⃣ Stop Kaspad

If you’re running it in Docker:

bash
docker stop kaspad

If you’re running it directly:

bash
pkill kaspad

2️⃣ Create the new data directory

bash
mkdir -p "/media/derek -samuel/KASPA-NODE/kaspad"

3️⃣ Move your existing blockchain data

bash
mv ~/.kaspad/* "/media/derek -samuel/KASPA-NODE/kaspad/"

If the folder is empty (fresh install), this step is optional.


4️⃣ Run Kaspad with the new data directory

✔ If you run Kaspad directly:

bash
kaspad --appdir="/media/derek -samuel/KASPA-NODE/kaspad"

✔ If you run Kaspad in Docker:

Add this to your docker run or docker-compose:

docker run example

bash
docker run -d \
  --name kaspad \
  -p 16110:16110 \
  -p 16111:16111 \
  -v "/media/derek -samuel/KASPA-NODE/kaspad:/app/data" \
  rusty-kaspa/kaspad:latest \
  --appdir=/app/data

docker‑compose example

yaml
volumes:
  - "/media/derek -samuel/KASPA-NODE/kaspad:/app/data"

command: ["--appdir=/app/data"]

5️⃣ (Optional) Replace the old folder with a symlink

This keeps tools that expect ~/.kaspad happy:

bash
rm -rf ~/.kaspad
ln -s "/media/derek -samuel/KASPA-NODE/kaspad" ~/.kaspad

🧠 Important Notes

  • Your path has a space (derek -samuel), so always quote it.

  • External drives must be mounted before Kaspad starts.

  • If the drive disconnects, Kaspad will fail to start — normal behavior.


Code
/media/derek -samuel/KASPA-NODE

—with the dash but no space before or after it—then everything becomes much simpler. That means the actual directory name is:

Code
derek-samuel

So the real, literal path on disk is:

Code
/media/derek -samuel/KASPA-NODE

Ubuntu treats that as a folder named:

  • derek -samuel (with a space before the dash)

This is totally valid — you just need to quote it every time.

Let’s lock in the correct Kaspad move using that exact path.

🚀 Move Kaspad to /media/derek -samuel/KASPA-NODE/kaspad

Here’s the clean, correct sequence.

1️⃣ Stop Kaspad

Docker:

bash
docker stop kaspad

Native:

bash
pkill kaspad

2️⃣ Create the new Kaspad data directory

bash
mkdir -p "/media/derek -samuel/KASPA-NODE/kaspad"

3️⃣ Move your existing data

bash
mv ~/.kaspad/* "/media/derek -samuel/KASPA-NODE/kaspad/"

If ~/.kaspad is empty, this step is optional.

4️⃣ Run Kaspad using the new directory

✔ Native (non‑Docker)

bash
kaspad --appdir="/media/derek -samuel/KASPA-NODE/kaspad"

✔ Docker

Mount the directory and point Kaspad to it:

bash
docker run -d \
  --name kaspad \
  -p 16110:16110 \
  -p 16111:16111 \
  -v "/media/derek -samuel/KASPA-NODE/kaspad:/app/data" \
  rusty-kaspa/kaspad:latest \
  --appdir=/app/data

5️⃣ Optional: Symlink for compatibility

bash
rm -rf ~/.kaspad
ln -s "/media/derek -samuel/KASPA-NODE/kaspad" ~/.kaspad

This keeps tools that expect ~/.kaspad working.

🧠 Quick sanity check

To confirm the folder name exactly, run:

bash
ls /media

If you see:

Code
derek -samuel

Then everything above is 100% correct.




Comments