지인의 추천으로 터미널의 테마를 지정할 수 있고, 자동 완성 기능이 편한 

 

oh-my-zsh 를 추천받게 되었습니다.

 

https://github.com/ohmyzsh/ohmyzsh

 

GitHub - ohmyzsh/ohmyzsh: 🙃 A delightful community-driven (with 1900+ contributors) framework for managing your zsh configu

🙃 A delightful community-driven (with 1900+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, pytho...

github.com

 

oh-my-zsh는 bash 쉘이 아니라 zsh 쉘로 zsh쉘을 꾸미고 관리하는 프레임워크입니다.

 

oh-my-zsh 설치

 

1. zsh 설치

$ sudo apt install zshCopy Icon

2.  아래 3개 중 아무거나 하나 선택하여 설치합니다.

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

3. 만약, chsh: /usr/local/bin/zsh is an invalid shell 오류가 나온다면 다음을 입력해주세요

$ command -v zsh | sudo tee -a /etc/shells
$ sudo chsh -s "$(command -v zsh)" "${USER}"Copy Icon

 

완료!


oh-my-zsh 테마 변경

 

테마의 종류는 다음 사이트에서 확인이 가능합니다.

 

https://github.com/ohmyzsh/ohmyzsh/wiki/themes

 

GitHub - ohmyzsh/ohmyzsh: 🙃 A delightful community-driven (with 1900+ contributors) framework for managing your zsh configu

🙃 A delightful community-driven (with 1900+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, pytho...

github.com

 

1. vi 편집기를 통해 .zshrc 파일을 열어줍니다.

$ vim ~/.zshrcCopy Icon

 

2.  ZSH_THEME="[지정테마]"  부분을 수정해줍니다. 저는 agnoster로 지정하였습니다. (국룰이라고 하더라구요)

ZSH_THEME="agnoster"Copy Icon

vi 편집기에서 i는 편집모드로 변경, esc는 편집모드 종료, 편집모드 종료에서 :wq 를 입력하면 저장 후 종료입니다.

 

3. 적용 합니다.

$ source ~/.zshrcCopy Icon

터미널 폰트 설정

 

하지만 agnoster은 다음과 같이 폰트 설정이 필요합니다.

oh-my-zsh github

1. 다음을 입력합니다.

$ git clone https://github.com/powerline/fonts.git --depth=1
$ cd fonts
$ ./install.shCopy Icon

 

2. 상단 메뉴바에서 preferences를 클릭 후 Custom font를 클릭해줍니다.

3. ~ Powerline ~ 아무거나 선택해서 변경해줍니다.

폰트 설정 끝!


Plugin 설치

 

여러가지의 플러그인들이 있지만 주로 2개의 플러그인을 추천드립니다.

 

1. zsh-syntax-highlighting

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

 

2. zsh-autosuggestions

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

 

3. ~/.zshrc 설정

$ cd ~
$ vi ~/.zshrcCopy Icon

 

70번째 줄을 가시면 plugins=(git) 이 있습니다.

이것을 다음과 같이 변경하시고 저장 후 나가시면 됩니다.

plugins=(git zsh-syntax-highlighting zsh-autosuggestions)Copy Icon
$ source ~/.zshrcCopy Icon
욱근욱