Skip to content

Change or add user folder locations in Ubuntu

Published: November 1st, 2024 Ubuntu Stack of big folders or binders

If you want to change the default locations of your user directories like Downloads, Videos, or Documents in Ubuntu, it’s quite simple. Here’s a step-by-step guide to help you through the process.

Open configuration file

  1. Open a terminal (Ctrl + Alt + T).

  2. Type the following command to edit your user’s configuration file:

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

Edit folder location

In the text editor, you’ll see lines corresponding to each user directory. For example, to change the location of the Downloads folder, find the line:

XDG_DOWNLOAD_DIR="$HOME/Downloads"
Bash

You can change the location to a new path, just make sure it exists. For example:

XDG_DOWNLOAD_DIR="$HOME/Misc/Downloads"
Bash

Save the file and log in again

You can now save the file and close nano with CTRL + X, then Y, and Enter.

You might need to log out and log back in to activate the changes.

Changing user directory locations in Ubuntu can help you organize your files better or free up space on your primary drive. By following these steps, you’ll be able to customize your file management experience to fit your needs.

About Marcel Bootsman

Marcel discovered the web in 1995. Since then he has paid attention to and worked with lots of technologies and founded his own WordPress oriented business nostromo.nl in 2009.

Currently Marcel is Business Development Manager Dutch & DACH Markets at Kinsta where he helps Kinsta's client base grow with Managed WordPress, Application, Database and Static site hosting.

You can contact Marcel on a diverse range of online platforms. Please see the Connect section on the homepage for the details.