macOS에 개발 환경 구축하기 ver.2026
최근 필자는 사용중인 맥북을 초기화 할 일이 생겨 진행 후 새로 환경을 구축하다가, 따로 기록해두면 좋겠다는 생각이 들어 이 글을 작성하게 되었다. 사람마다 환경 설정에 취향 차이가 있지만, n년동안 맥북을 쓰면서 필자 개인적으로 생각하는 가장 좋은 환경을 설정하는 방법을 소개해 본다.
기본 프로그램 설치
웹사이트 통해 설치
- Chrome
- VSCode
- Karabiner Elements : 키보드에 할당된 키를 변경할 수 있는 프로그램
- Microsoft Office
- iTerm2
- Orbstack : 공식 Docker desktop 보다 가벼운 Docker 환경 제공
- Claude Desktop
- ChatGPT Desktop
앱스토어에서 설치
- Slack
- Goodnotes
CLI 설정
iTerm2 설정
- Apperance > General > Theme :
Minimal - Apperance > General > Status bar location :
Bottom - Profile > General > Initial directory :
Reuse previous session's directory - Profiles > Colors > Color preset : 원하는 테마 다운받아 적용
- Profiles > Text > Normalization :
NFC - Profiles > Terminal > Scrollback lines :
100,000 - Profiles > Session > Status bar :
enable - Advanced > In the Minimal theme, how prominent should the tab outline be? :
0
Homebrew
Homebrew는 macOS에서 사용하는 패키지 매니저 (i.e. Linux의 apt, apt-get)이다. 공식 홈페이지에서 설치 스크립트를 제공한다.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Git
방금 설치한 brew를 활용해서 git을 (재)설치하도록 하자. brew로 설치한 git과 git-lfs는 대용량 바이너리 파일을 git으로 관리할 수 있게 해준다.
brew install git git-lfs
git lfs install
git config --global user.name "Your Name"
git config --global user.email "you@your-domain.com"
git config --global core.precomposeunicode true
git config --global core.quotepath falseOh My Zsh
현재 맥에서 기본 쉘은 zsh이다. 여기에서 추가로 CLI 편의를 도와주는 플러그인, 테마 등을 지원해주는 Oh My Zsh를 설치할 것이다.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
설치한 이후에는 zsh에서 거의 필수로 사용하는 두가지 플러그인, zsh-syntax-highlighting 와 zsh-autosuggestions 를 설치한다. brew를 활용해 zsh 설정 파일 수정 없이 손쉽게 설치 및 적용이 가능하다.
brew install zsh-syntax-highlighting
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
brew install zsh-autosuggestions
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh마지막으로 zsh의 태마를 설치한다. 필자의 경우에는 powerlevel10k를 사용하지만, 본인의 취향에 맞는 태마를 사용하면 된다.
brew install powerlevel10k
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc개발환경 설정
SSH (Github)
최근 Github의 repo를 로컬에서 조작하기 위해선 SSH key를 발급받아 SSH method로 작업하기를 권장하고 있다. 관련해서 추후 서버와의 연결도 SSH key 로 편하게 연결하기 위해 SSH key를 발급하고 Github에 등록하자.
ssh-keygen -t ed25519 -C "your_email@example.com"이후 SSH를 관리하고 git에서 사용할 수 있게 해주는 ssh-agent를 설정하자. 우선 ~/.ssh/config 파일을 수정해보자. (만약 파일이 없는 경우에는 새로 만들면 된다.)
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Host lab
HostName 123.45.67.89
User parksw
Port 2727
IdentityFile ~/.ssh/id_ed25519상단 Host github.com의 경우에는 Github repo를 사용하기 위해 넣는 부분이고, 아래 Host lab 부분의 경우에는 원격 ssh 접속시 ip를 일일히 입력하지 않고 ssh lab만으로 접속할 수 있게끔 설정하는 부분이다. 본인의 원격 환경에 맞게끔 수정/추가하면 될것이다.
이제 위 내용들을 적용할 수 있게 ssh-agent와 ssh-copy-id를 실행하자.
eval "$(ssh-agent -s)"
# ssh-agent에 SSH 프라이빗 키를 추가하고 키 집합에 암호를 저장
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
# `lab` 서버 엔드포인트에 ssh public 키를 전송
ssh-copy-id gpu최종적으로 만든 SSH public key를 github에 올리자. 아래 명령어를 실행하면 클립보드에 public 키가 복사된다.
pbcopy < ~/.ssh/id_ed25519.pub복사한 public 키를 여기에서 Github에 등록하자.