"Dotfiles" (also known as "hidden files") are files with names beginning in a dot/period (".") and will not be visible by default. The way to make dot files visible depends on your operating system:
Windows 11
In the File Exporer, click on "View", then find and click "Show", and then "Hidden items".
Windows 10
In the File Exporer:
- Click on "View", then "Options"
- If displayed, click on "Change folder and search options", otherwise continue
- In the window that opens, click the "View" tab
- Find the radio button labelled "Show hidden files, folders, and drives", and click it
Mac
While in Finder, press "⌘Command + Shift + dot/period".
When using ls
Dotfiles will also not appear in the results of the ls
command. To get them to appear:
- In Mac or Linux terminals, add the
-a
option. - In Windows PowerShell, add the
-Force
option. (This also works withGet-ChildItem
, e.g.Get-ChildItem -Force
)
Why are dot files hidden?
Dotfiles being hidden was originally a bug in a version of Unix. Future Unix versions deliberately kept this behavior to retain program compatibility, and developers of other operating systems chose to do so as well to abide by what had come to be expected functionality.