OKdevTV Docs
Home OKdevTV
ESC
zsh 1 min read 2.0 KB Raw Markdown
On this page (6)

zsh

  • https://www.zsh.org
  • https://ohmyz.sh/
  • 인터랙티브한 사용을 위해 설계된 쉘, 파워풀한 스크립팅 언어
  • git 사용시 브랜치 등을 프롬프트에 보여주며 매우 편리함
  • history 기능 압도적

설치

sh
sudo dnf install zsh git util-linux-user -y
sh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

설치(맥)

zsh installed
  • 정상적으로 설치되었다면 cmd+N 으로 zsh로 실행됨
  • 만약 그대로라면 chsh -s /usr/local/bin/zsh 명령으로 shell 변경 가능

Windows Git Bash

sh
echo 'test -f ~/.bashrc && . ~/.bashrc' > ~/.bash_profile
echo 'if [ -t 1 ]; then
  exec zsh
fi' > ~/.bashrc
sh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Plugin

sh
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions.git
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
  • vi ~/.zshrc
sh
plugins=(
	git
    zsh-autosuggestions
    zsh-syntax-highlighting
)

Change Shell

sh
chsh -s $(which zsh)
  • set password in cloud
sh
sudo su
passwd ec2-user

참고