Dotfiles are hidden configuration files on Unix-like systems (including Linux and macOS) that store settings for various applications, tools, and shells.
They are called “dotfiles” because they typically start with a dot (.) prefix, making them invisible by default in file listings.
These files are used to customize the behavior of programs, editors, and shells, allowing users to tailor their workflow, environment, and productivity.
Where are dotfiles in the Linux file system?
The user-space dotfiles are mainly located in the following directories
~/
~/.config
Keep in mind that ~/ is an alias for the $HOME shell variable, storing your username.
I.e. if your username is john the $HOME variable is "/home/john"
How can I show the dotfiles ?
As previously mentioned dotfiles are hidden files by default so they are not visible from the shell or from the file-managers.
Here is how to show them in the file-manager(s):
For Nautilus (GNOME): Press Ctrl + H to toggle hidden files visibility.
For Nemo (Cinnamon): Go to Edit > Preferences > Views and check the box next to “Show hidden files”.
For Dolphin (KDE): Go to Settings > Configure Dolphin > View > Show hidden files and folders.
For Thunar (Xfce): Go to Edit > Preferences > Behavior > Show hidden files
Here is how to show them at the shell prompt.
Open your terminal and type the following command, and type Return.
ls -alh
where the 'h' flag enables the listing of hidden files.
Conclusion
Dotfiles store system and application settings.
They can be backed up and used to restore your system and app configurations quickly and easily by simply copying them into the right directories.
The above task can be daunting, especially if settings are a lot and stored in several sub-directories.
There are ways to automate the task.
In the next post I will show you how to manage the dotfiles using a git bare repository.
Comments