iTerm2와 oh-my-zsh를 활용한 macOS 터미널 설정

터미널 환경 구성 개요

iTerm2, oh-my-zsh, Solarized Dark Higher Contrast 테마 조합으로 최적화된 터미널 환경을 구성합니다.

iTerm2 및 색상 구성

  • iTerm2 공식 사이트에서 애플리케이션 다운로드
  • Solarized Dark Higher Contrast 색상 프로필 추가

환경 설정 단계

  1. Closing 메뉴 내 알림 옵션 비활성화
  2. Selection 영역에서 자동 복사 기능 해제
  3. Advanced → "Dock 제외 시 상태 바 아이콘 표시" 활성화
  4. Appearance → "탭 전체 너비로 확장" 선택
  5. Colors → 다운로드한 색상 프로필 임포트 후 적용
  6. Text → 커서 스타일: Vertical Bar 설정
  7. Window → 화면 상단 고정, 자동 숨김 활성화
  8. Terminal → 무제한 스크롤백, 벨 알림 음소거

패키지 관리자 설치

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

zsh 셸 구성

macOS에는 기본 포함되어 있으며 Linux 환경에서는 패키지 관리자로 설치:

sudo apt install zsh  # Ubuntu 예시

oh-my-zsh 설치

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

자동 업데이트 설정

# .zshrc에 추가
DISABLE_UPDATE_PROMPT=true

powerlevel10k 테마 설정

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

.zshrc 파일에서 테마 변경:

ZSH_THEME="powerlevel10k/powerlevel10k"

효율성 플러그인 구성

# 플러그인 설치
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM}/plugins/zsh-autosuggestions
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting ${ZSH_CUSTOM}/plugins/fast-syntax-highlighting
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM}/plugins/zsh-history-substring-search

플러그인 활성화

plugins=(
  directory-path-copy
  file-content-copy
  privilege-escalation
  version-control
  directory-jump
  command-history-search
  auto-suggestions
  syntax-highlighter
)

고급 터미널 도구

brew install modern-ls enhanced-cat disk-usage advanced-finder text-searcher storage-analyzer file-explorer
  • modern-ls: 향상된 ls 대체 도구
  • enhanced-cat: 구문 강조 cat 유틸리티
  • disk-usage: 시각적 디스크 사용량 분석
  • advanced-finder: 고성능 파일 검색
  • text-searcher: 효율적 텍스트 검색 엔진

태그: iTerm2 oh-my-zsh zsh powerlevel10k Homebrew

5월 30일 04:24에 게시됨