본문 바로가기

카테고리 없음

맥북 초기설정

# ========== Step 1: Xcode Command Line Tools ==========
xcode-select --install
# 팝업에서 "설치" 클릭, 완료 대기 (5-10분)

# ========== Step 2: Homebrew 설치 ==========
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Enter 키, 비밀번호 입력, 완료 대기 (5-10분)

# ========== Step 3: 환경변수 설정 ==========
# M1/M2/M3 Mac
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

# Intel Mac
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/usr/local/bin/brew shellenv)"

# ========== Step 4: 확인 ==========
brew --version
brew doctor  # 문제 있으면 알려줌

# ========== Step 5: pyenv 설치 ==========
brew install pyenv

# ========== Step 6: pyenv 환경변수 ==========
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc

# ========== Step 7: Python 설치 ==========
pyenv install 3.11.9
pyenv global 3.11.9
python --version

# ========== 완료! ==========

# Homebrew 설치 후 바로 설치하면 좋은 것들

# 1. pyenv (Python 버전 관리)
brew install pyenv

# 2. Git (버전 관리)
brew install git

# 3. iTerm2 (더 나은 터미널)
brew install --cask iterm2

# 4. VS Code (코드 에디터)
brew install --cask visual-studio-code

# 5. 기본 도구들
brew install wget curl tree

brew install font-meslo-lg-nerd-font
# Oh My Zsh 설치
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Powerlevel10k 설치
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# ~/.zshrc 수정
nano ~/.zshrc

# 아래 줄 찾아서:
ZSH_THEME="robbyrussell"

# 이렇게 변경:
ZSH_THEME="powerlevel10k/powerlevel10k"

# 저장: Ctrl+O → Enter → Ctrl+X

# 자동완성 제안 (회색 글씨로 명령어 제안)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# 문법 하이라이팅 (명령어 색상)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# 확인
ls ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/
# zsh-autosuggestions, zsh-syntax-highlighting 보이면 성공

nano ~/.zshrc
plugins=(
  git
  python
  pyenv
  brew
  zsh-autosuggestions
  zsh-syntax-highlighting
)

source ~/.zshrc


# iTerm2 실행
open -a iTerm

# Dracula 테마 다운로드
cd ~/Downloads
curl -o Dracula.itermcolors https://raw.githubusercontent.com/dracula/iterm/master/Dracula.itermcolors

iTerm2 → Preferences → Profiles → Colors
Color Presets → Import
Dracula.itermcolors 선택
Dracula 선택


기본 프로필로 설정:

Profiles → Other Actions → Set as Default