File and directory naming conventions

The organization of the system files is up to the operating system maker. Linux distributions by and large follow the Linux filesystem hierarchy standard (FHS). As a user or system administrator, the FHS (and your distribution's additional conventions) may occasionally be useful if you need to locate a file or if you want to understand a file's role given its location, but it doesn't constrain you, you can still do what you want (at your own risk).

Inside your home directory, you can do pretty much what you want, with one exception: dot files, i.e. files whose name begins with a . in your home directory, are configuration or state files, and applications require them to have a particular name. For example, bash will always read ~/.bashrc when it starts (except when it doesn't but that's another story), so you'd better not use that name for another purpose.

The Freedesktop project, which is mostly a common ground for Gnome and KDE, has defined a few standard directories in $HOME: Documents, Music, etc. Some applications will create these directories if they don't exist, and use them as default locations. You can change their names, and in fact they are supposed to be translated to your language. The software component that manages these directories is xdg-users-dirs. You can change the directory names by setting different values in ~/.config/user-dirs.dirs.


There are a couple conflicting parts here. The comment about being able to do whatever you want is true, but it will also make much more work for you in the long run.

If you have any idea about re-arranging anything outside of your home directory, stop! That's way more complicated than you think and you should leave it alone. If you don't like it you should change to a different distro or even operating system. If none suit you you would need to roll your own, but you can't just move system directories around without getting burned. See this question for some idea what would happen if you wanted to go that way.

So we're down to your home directory.

First of all, remember as you think up a structure that permissions are hierarchical. In order for somebody to have permissions on a given folder, they need to have at least execute permissions on every folder ABOVE that folder. If you have anything in your home directory that you share, it needs to be near the top (e.g. ~/Music), anything you want to restrict should be in subfolders with limited permissions (e.g. ~/.ssh/id_rsa).

Secondly, there are no rules or even best practices per-se but there are conventions. Lots of software use default values that you may or may not be able to change, but even when you can change them it's troublesome to have to do constantly. Gnome, and particularly Ubuntu stuff, likes folders with nice names starting with capitals. If you try moving "Downloads" to "downloads" you'll find the original probably gets created again before too long by some program with an assumed default. You'll have to decide how much swimming against the tide you want to do in these cases.


On GNU/Linux the relevant standard is the Filesystem Hierarchy Standard (FHS). However that does not cover directory naming conventions within a users home directory.