C.W.K.
Stream
Lesson 06 of 12 · published

숨김 파일과 Dotfile

~10 min · dotfiles, hidden, config

Level 0창 구경꾼
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

이름 앞 점 하나가 전부

Unix '숨김' 파일은 진짜 숨겨진 게 아니야. 이름이 . 으로 시작할 뿐인 거고, 관례상 ls / GUI 파일 매니저 / 대부분 도구가 기본적으로 건너뛰어. ls -A 한 번이면 다 나타나.

홈에 살고 있는 dotfile

  • ~/.zshrc, ~/.zprofile — zsh 설정
  • ~/.bashrc, ~/.bash_profile — bash 설정
  • ~/.gitconfig — git 글로벌 설정
  • ~/.ssh/ — SSH 키와 config (보통 chmod 700)
  • ~/.config/ — XDG 스타일 설정 트리 (Starship, fish, nvim 등)
  • ~/.local/share/ — XDG 데이터
  • ~/.cache/ — XDG 캐시 (지워도 OK)

왜 숨겨?

홈을 깨끗하게 유지하기 위해서. 안 그러면 ls ~ 만 했는데 오십 개 도구 설정이 다 떠. 기본 숨김으로 두면 정작 작업하는 파일만 보여.

Dotfile 버전 관리

대부분 개발자가 ~/.zshrc, ~/.gitconfig 같은 거 git repo 로 추적해. chezmoi, GNU Stow 같은 도구 (나중에 다룸) 가 symlink 관리. 새 Mac 셋업 처음에 git clone + chezmoi apply 5 분이면 평소 shell 이 그대로 깔려.

Code

홈의 모든 dotfile 찾기·bash
ls -A ~ | head -30
# Just the directories
ls -dA ~/.* 2>/dev/null | head -20
# Their total size
du -sh ~/.* 2>/dev/null | sort -h | tail

External links

Exercise

ls -A ~ | wc -l 로 숨김 파일 개수 확인. du -sh ~/.* 2>/dev/null | sort -h | tail 로 제일 큰 숨김 디렉터리 찾기 — 대부분 Mac 에서 ~/.cache, ~/.docker, ~/.cursor 가 1 등.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.