Dotfiles are the older form, and I believe avoiding them completely will be difficult unless you use a distribution that insists on patching every software included to use the .config
directory tree instead of plain dotfiles. Many old applications will have a long history of using a particular dotfile; some may have their own dot directory. Others may actually have both: for example, vim
supports .vimrc
, but also .vim/
directory with multiple files and a specific sub-directory structure.
The .config
directory structure is based on XDG Base Directory Specification. It was initially taken up by Desktop Environments like GNOME and KDE, as they both originally had a lot of per-user configuration files and were both already independently chosen somewhat similar sub-directory solutions.
For GUI file managers, the concept of hidden files can be problematic: if you choose to not display file and directory names beginning with a dot by default, following the classic unix-style behavior, the existence and function of dot files will not be easily discoverable by a GUI user. And if you choose to not hide the dot files and directories, you get a lot of clutter in your home directory, which is in some sense the absolute top level of your personal workspace. Both ways will make someone unhappy.
Pushing the per-user configuration files to a dedicated sub-directory can be an attractive solution, as having just one sub-directory instead of a number of dot files and/or dot directories will reduce clutter when "hidden" files are displayed in GUI, and the difference in ease of access is not too big. But it flies in the face of long-standing user expectations: (some) dotfiles "have always been here and named like this".
This is going to be a very opinion-based issue.
If the dotfiles are not related to login access or some other privileged access control, you can use symlinks to bridge from one convention to another, whichever way you prefer. But if you really edit a specific configuration file so often that ease of access is important, perhaps you might want to create a shell alias or desktop icon/menu item that opens the actual configuration file in your favorite editor immediately (using an absolute pathname) instead? It could be even more convenient.
Some dotfiles and directories are accessed by privileged processes (e.g. as part of authentication and access control) like ~/.ssh
, ~/.login_conf
etc. and they cannot normally be replaced by symbolic links, as these processes want the actual file instead of a symbolic link in the designated location in order to disallow various kinds of trickery and exploits. If you want to relocate these files, it must be done by modifying the configuration of the appropriate process, usually system-wide.