parasurv@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.

Hosted on Neocities and created with Emacs, the world best text editor, operating system. 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. Some parts of the site is not up-to-date design wise. I may or may not update them in the future.