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
Open a terminal (Ctrl + Alt + T).
Type the following command to edit your user’s configuration file:
nano ~/.config/user-dirs.dirsBash
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.