Change or add user folder locations in 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

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"

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

XDG_DOWNLOAD_DIR="$HOME/Misc/Downloads"

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 Partnerships & Community Manager EMEA at Kinsta. where he helps clients and partners grow with their business with Managed Hosting for WordPress.

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

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *