Agentic Research

Dotfile

Also: 點檔案 · 隱藏檔案 · dotfiles · .zshrc · .gitignore

Files whose names begin with a dot: hidden from listings by default, because they are usually configuration rather than content you browse.

When you will meet it

Your shell's personality lives in ~/.zshrc, git's identity in ~/.gitconfig, SSH keys in ~/.ssh/, the project's API key in .env — nearly every backstage setting of an AI dev environment is a dotfile. When a guide says "append this to your .zshrc" or "create .env in the project root", remember these files are hidden by default: ls will not show them, Finder will not either, and you will doubt whether the file you just created exists at all.

An analogy

Like the control desk behind a stage: the audience (ls) sees only the show, while the switches and wiring (dotfiles) sit behind the curtain. Hidden does not mean absent — add a -a and you can walk backstage.

Minimal example

touch .demo        # 建一個檔名以 . 開頭的檔案
ls                 # 清單裡沒有它
ls -a              # 加 -a 才看得到(同時會看到 . 和 .. 兩個目錄)
rm .demo           # 清理掉

"Hidden" is just the default display behaviour of ls and Finder — not encryption, not protection; any program can read them. In macOS Finder, Command+Shift+. toggles them. The convention is pure Unix heritage: early tools skipped names starting with a dot, and everyone started parking out-of-the-way configuration there.

What people get wrong

  • Running ls, seeing no .env or .gitignore, and concluding the project has none. Look with -a before concluding — the tool you just installed most likely wrote its settings into a dotfile already.
  • Committing secret-carrying dotfiles (.env, private keys under ~/.ssh) to git. The dot hides files from listings, not from git: once pushed, they are public. .env belongs in .gitignore — which is itself a dotfile.

Related terms

Next