0

I just migrated from windows to ubuntu. I noticed that in /home/[user]/, there are directories like Documents, Music etc. On windows, these were unusable because many programs would just dump configuration files, screenshots and the likes into these folders.

Will programs on ubuntu also access these folders? What would be the implications of adapting them for daily use or straight up deleting them?

2
  • They are used by the graphical file managers like Nautilus. See also this: askubuntu.com/questions/67044
    – FedKad
    Jan 15, 2021 at 19:39
  • Don't worry, Ubuntu doesn't do that. I would suggest, before start making complicated changes, that you familiarize on this structure. You are the "owner" of these folders, and only you can decide what data goes into them. Jan 15, 2021 at 20:07

2 Answers 2

4

Several applications use these folders as default locations for files, but you can always reconfigure that in the application. For example image viewers will look for images in Images, audio players will look for music files in Music, Firefox will save downloaded files to Downloads etc. Also it should be noted that the built-in screenshot feature (PrtSc key) dumps screenshot images right into the Images folder.

Myself I use these folders according to their intended purpose, ie. keep my documents in Documents, video files in Videos etc. I even have created multiple subfolders within them. Have no issues with that.

No configuration files are stored in these folders. In Linux, configuration is kept in hidden files or hidden folders ("hidden" in Linux means that the file or folder name starts with a dot, while in Windows hidden files are indicated by a special "hidden" attribute, not by name) within user's home directory. Most of the config is kept in subfolders within .config folder, but some applications have their own locations - for example Firefox keeps configuration in .mozilla folder, and if you install Zoom, it will keep it's configuration and temporary working data in .zoom folder.

2
  • Maybe would be useful to add that applications don't store configuration files in these folders (though this is my personal experience with several Linux systems). But they use hidden folders under user's home like ~/.config Jan 15, 2021 at 22:05
  • I have added that to the answer.
    – raj
    Jan 15, 2021 at 22:14
3

Will programs on ubuntu also access these folders?

There is default software that use them but they do not rely on them being there. For all others: Only if you tell them to. Browsers and torrent software like using "Downloads". Editors like to use "Documents". /home/$USER/ should normally be a fallback.

Mind that Desktop is fairly important as this is used as the location to show you icons on the Desktop. But even that one is not mandatory to have.

What would be the implications of adapting them for daily use or straight up deleting them?

If you delete all normal files in /home/$USER/ the system will recreate them.

There is a file responsible for setting this up:

~/.config/user-dirs.dirs 
# 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="/discworld/Desktop"
XDG_DOWNLOAD_DIR="/discworld/Downloads"
XDG_TEMPLATES_DIR="/discworld/Templates"
XDG_PUBLICSHARE_DIR="/discworld/Public"
XDG_DOCUMENTS_DIR="/discworld/Documents"
XDG_MUSIC_DIR="/discworld/Music"
XDG_PICTURES_DIR="/discworld/Pictures"
XDG_VIDEOS_DIR="/discworld/Videos"

The names here also get translated to your language if you use another than the default.

There is also a command to manipulate it:

xdg-user-dirs-update --set DOWNLOAD ~/Internet

and one to view the directory it is set to:

xdg-user-dir TEMPLATES

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .