📦 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:
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:
xdg-user-dirs-update --set DOWNLOAD /mnt/Data/Downloads
✔ Change Pictures to a custom folder:
xdg-user-dirs-update --set PICTURES /home/$USER/Images
✔ Change Documents to an external SSD:
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:
nano ~/.config/user-dirs.dirs
You’ll see lines like:
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_PICTURES_DIR="$HOME/Pictures"
Change the paths, save, log out/in.
🌍 System‑Wide (All Users)
Edit:
sudo nano /etc/xdg/user-dirs.defaults
But note: per‑user settings override this.
🧠 Important Notes
Paths must be absolute (
/home/...or/mnt/...).$HOMEworks 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).
Comments
Post a Comment
Tell me what you think and be honest with me.....I got 2 know...... ✌️🤗😁