blog + microblog + linkblog + site updates + contact + about me + RSS

writer13's webspace

Change the default user directories in Linux

Created: 2020-09-01

In Linux when a user's HOME directory is created, the system creates a bunch of additional folders, like Desktop, Music, Downloads, Templates, etc. Depending on our needs, this can overpopulate our little home in the system.

default user directories in the home folder

To change that, we need to edit this file in our favorite text editor

~/.config/user-dirs.dirs

The content of this file will look something like this:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

$HOME means, our home folder, like /home/emergencyexit, in the example above. We can modify the list above as long as we stay in our home directory, where we have proper permissions.

After saving the file, starting our file manager (like Dolphin, Thunar or Nautilus), the sidebar content won't change, but when we click on these default directories, they should show the modified directory.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

In case you are wondering: This website doesn't track you. I don't use any javascript or other scripts. I don't store any information about the visitors. It's just pure old fashioned HTML and some CSS (plus some custom fonts). Hosted on Neocities and created with Emacs.

parasurv.neocities.org 2018-2022 - writer13.neocities.org 2022-