0%

在macOS安裝ZSH

安裝概覽:

  1. Install Homebrew
  2. Install zsh
  3. Switch default shell to zsh
  4. Install oh-my-zsh
  5. Edit setting

安裝Homebrew

Install Homebrew

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安裝zsh

1
brew install zsh

Confirm the installation

1
zsh --version

切換預設shell至zsh

1
sudo sh -c "echo $(which zsh) >> /etc/shells"
1
chsh -s $(which zsh)

Restart termianl

1
echo $SHELL

if success you’ll see:

1
/usr/local/bin/zsh

安裝oh-my-zsh

1
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

Copy oh-my-zsh templete to zshrc

1
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

DONE!