This term is a wonderful demonstration of Unix at large being an organically grown system that was shaped and moulded as its users' habits built upon each other. It is the colloquial name for a file that stores some of a user's settings or preferences for a specific application or a class thereof. The name derives from the fact that they're commonly stored in a file or directory whose name starts with a dot, located directly under the user's home directory. This became a convention because of the larger convention that filenames starting with a dot be treated as hidden, although there's nothing actually special about them. This was originally a simple heuristic to avoid having the special . and .. directories show up in every file listing.
Examples of DotFiles can be seen in SampleConfigFiles.
Unfortunately, dotfiles have led to the chronic phenomenon of dotfile clutter. Do an ls -lA on a typical user’s home directory, and you will likely see dozens of names beginning with dots. This has a few unfortunate effects:
For these reasons, it seems a good idea to give the user more control over where these preference files are created. The only serious proposal I know of is the XDG Base Directory Specification. This says that user prefs should be created in the directory specified by the EnvironmentVariable XDG_CONFIG_HOME. If this is not defined, then the prefs should go in the directory $HOME/.config/. The directory should be created if it doesn’t exist, to be readable and writable by the owner but inaccessible to anyone else.
Thus, all the dotfile clutter is replaced by a single dotted-directory name, and the user has the option of overriding even this. Much cleaner overall, don’t you agree?
4 pages link to DotFile: