zsh 설치(Install)

Hognod·2023년 9월 14일

MacOS

1. zsh Package Install

brew udpate
brew install zsh

2. oh-my-zsh Install

oh-my-zsh을 설치하기 위해 아래 링크의 Basic Installation 부분 확인

https://github.com/ohmyzsh/ohmyzsh

oh_my_zsh

아래 세 가지 방식 중 택 1하여 진행

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

3. Oceanic Next Iterm 테마 다운로드

링크를 눌러 master.zip 파일을 다운로드 후 Oceanic-Next.itermcolors 파일을 클릭하여 테마를 추가

iTerm2 → Preferences → Profiles → Colors → Color Presets... → Oceanic-Next 을 선택하여 테마를 변경

iterm

4. 폰트 적용

  1. 링크를 눌러 Ubuntu Mono derivative Powerline.ttf 를 다운로드

  2. 다운로드한 파일을 실행하여 서체를 Mac에 등록

  3. iTerm2 -> Preferences -> Profiles -> Text -> Font → Ubuntu Mono derivative Powerline 을 선택

    iterm2

5. plugin 다운로드

brew install zsh-syntax-highlighting

6. 테마 & plugin 적용

vi ~/.zshrc

테마 적용

ZSH_THEME="agnoster"

plugin 적용

Intel 기반 Mac

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Apple Silicon 기반 Mac

source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zshrc

Ubuntu

1. zsh Package Install

sudo apt update
sudo apt install -y zsh

2. oh-my-zsh Install

root에서 동일하게 사용하고 싶다면, 여기서부터 sudo su 로그인 후 /root 경로에서 진행하면 된다.

oh-my-zsh을 설치하기 위해 아래 링크의 Basic Installation 부분 확인

https://github.com/ohmyzsh/ohmyzsh

oh_my_zsh

아래 세 가지 방식 중 택 1하여 진행

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

3. plugin 다운로드

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

4. 테마 & plugin 적용

vi ~/.zshrc

테마 적용

ZSH_THEME='agnoster'

plugin 적용

plugins=(zsh-syntax-highlighting)
source ~/.zshrc

0개의 댓글