Oh-My-Zsh는 테마와 플러그인을 자유롭게 설정할 수 있는 향상된 터미널 소프트웨어입니다. 이를 사용하면 터미널 경험이 훨씬 좋아집니다. 설치 방법을 정리해 둡니다.
- ZSH 설치
BASH
sudo apt install zsh -y
- Oh-My-Zsh 설치
설치 중에 zsh로 전환할지 묻는 프롬프트가 나타납니다. 그 화면에서 전환해도 되고, chsh -s $(which zsh) 명령어로 직접 전환해도 됩니다. 그런 다음 echo $SHELL로 현재 셸을 확인할 수 있습니다(서버에 다시 접속해야 할 수 있습니다).
BASH
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
권장 폰트를 내려받아 설치하고, 터미널의 폰트를
MesloLGS NF로 설정합니다.BASHwget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf설치했던 폰트를 삭제하고 테마와 플러그인을 설치합니다.
Shell
# remove the installed font
rm -rf MesloLGS*.ttf
# powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# edit the zshrc
vi ~/.zshrc
.ZSHRC
# Change the theme of zsh
ZSH_THEME="powerlevel10k/powerlevel10k"
# Enable the plugins
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
그런 다음 서버에 다시 접속하면, 보통 Oh-My-Zsh의 설정 화면으로 진입합니다.
즐겁게 사용하세요!