기타
mac 터미널 기본세팅 ( iterm2, zsh, ohmyzsh, gitconfig )
Gibson 김형섭
2018. 11. 2. 18:04
mac을 초기화하거나, 새 맥북이 생겼을 때 터미널 세팅을 하기 위한 기록용도 겸 정보공유
1. iterm2 설치
2. homebrew 설치 공식사이트
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3. zsh 설치
$ brew install zsh
4. oh-my-zsh 설치 github
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
5. oh-my-zsh agnoster 테마 적용하기
Powerline Fonts 다운로드 및 폰트적용
# clone git clone https://github.com/powerline/fonts.git --depth=1 # install cd fonts ./install.sh # clean-up a bit cd .. rm -rf fonts
완료 후
iterm > Preferences (단축키 cmd + ,) > profiles > text > change font
powerline 폰트 적용
Solarized dark 테마 다운 및 iterm에 적용
https://ethanschoonover.com/solarized/
위 링크에서 다운로드 후
iterm > Preferences (단축키 cmd + ,) > profiles > colors > color presets > import
Solarized Dark.itermcolors 파일 import 후
color presets에서 Solarized dark 선택
theme 변경 및 사용자명 제거
$ vim ~/.zshrc
ZSH_THEME="agnoster"
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default ""
fi
}
6. gitconfig 설정 ( alias, color등 )
--system 모든 사용자계정
--global 해당 사용자계정
$ git config --system --edit
vim 에디터로 config파일 수정
편리하고 아름다운 터미널 완성!