Dotfile

Share

What is a dotfile?

A dotfile is a file whose filename starts with a dot (.), e.g. .gitignore, .bashrc, .xsessionrc, .viminfo, and so on. Dotfiles are used a lot in Linux for configuration files used by programs.

The term dotfiles typically includes folders and directories as well (dotfolders, dotdirectories). For example, on Linux you may have a .config and .local directory in your home directory. VS Code creates a dotfolder .vscode in every workspace where it puts its tasks.json file.

Are Dotfiles Hidden Files?

Linux doesn't have the ability to make a file a "hidden file" the way you can do on Windows, and dotfiles weren't really created for this purpose, however, many applications that list files decided to start treating dotfiles as hidden files, hiding them by default from the user.

For example, in Linux Mint, dotfiles aren't shown by default, and ls requires the -a flag (--all) in order to include them in the list of files of a directory.

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments