Change the paths of personal folders

Deviate

Within the routes that are created in the operating system we have personal folders where they are supposed to store the different types of files or also to be able to categorize our documents and files within these.

Inside these folders we find the Downloads, Documents, Images, Videos, Music, which we generally find within any Linux distribution. This time I will show you how to change the paths of these folders to be able to customize our system.

To carry out this process, We will have to do it manually by editing the configuration found inside a file in the following path ~ / .config / user-dirs.dirs.

How to change the path of our personal folders by editing a file?

As I mentioned this is the method, to edit our configuration we will open a terminal and execute the following command:

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

Where we will find a configuration if not, it is similar:

# This file is written by xdg-user-dirs-update

# If you want to change or add directories, just edit the line you're

# interested in. All local changes will be retained on the next run

# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped

# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an

# absolute path. No other format is supported.

#

XDG_DESKTOP_DIR="$HOME/Escritorio"

XDG_DOWNLOAD_DIR="$HOME/Descargas"

XDG_TEMPLATES_DIR="$HOME/Plantillas"

XDG_PUBLICSHARE_DIR="$HOME/Público"

XDG_DOCUMENTS_DIR="$HOME/Documentos"

XDG_MUSIC_DIR="$HOME/Música"

XDG_PICTURES_DIR="$HOME/Imágenes"

XDG_VIDEOS_DIR="$HOME/Vídeos"

Now we only have to edit the routes that are indicated in this file, the most usual thing is that we indicate that the documents, images or downloads the path is to a pendrive or hard disk different from the one we are using.

You only have to indicate your custom routes by substituting them within this file.

Having finished this, we just have to save the changes with the following key combination Ctrl + O.

Without further ado, I can only say that this is an excellent option to get out of the routine in our system and be able to customize it, the only thing we must be careful about is the routes that we indicate, the only advice I can give is to avoid placing the paths of some folder in our root folder.


Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel said

    I make all the modifications but after restarting they are lost, it is as if linux replaced the modified file with the original one

  2.   Alberto said

    Thank you very much friend it worked perfectly in Deepin, I tried with the music folder and restarted and nothing was changed, it stayed as I modified it, again thanks for the help.

  3.   Fco said

    And how is it written and saved? Because it doesn't give me the option to "write" or anything like that. No one on the whole internet explains it

  4.   lyriel said

    To keep it in the case of those who change to another hard disk download Gnome Disk, open it, go and locate your hard disk, change the location where the disk is mounted (let's say from / mnt / 554345SSD to / home / name of your personal folder / Hard Disks / HDD), save and then do the steps that it says here.
    Once finished they can restart without fear that it will return to the previous thing.

  5.   George said

    Greetings from A Coruña. It has worked for me on Ubuntu 20.04.
    Indicate that it is necessary to restart
    Thank you