WSL 安裝 zsh

用 WSL 寫 code 當然是要用華麗的 oh-my-zsh 啊(誤)

安裝

zsh

1
2
3
4
$ sudo apt-get install zsh
$ which zsh
/usr/bin/zsh
$ chsh -s /usr/bin/zsh

oh-my-zsh

1
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

theme

  1. Powerline
    1
    2
    3
    $ sudo apt-get install fonts-powerline
    $ echo "⮀ ± ⭠ ➦ ✔ ✘ ⚡" # Test
    ⮀ ± ⭠ ➦ ✔ ✘ ⚡
  2. Theme
    1
    2
    3
    cd $ZSH_CUSTOM/themes
    wget https://raw.githubusercontent.com/caiogondim/bullet-train-oh-my-zsh-theme/master/bullet-train.zsh-theme
    vim ~/.zshrc
    修改 ZSH_THEME
    1
    2
    3
    4
    5
    # Find and change this
    ZSH_THEME="robbyrussell"

    # To this
    ZSH_THEME="bullet-train"

參考連結

  1. Windows Subsystem for Linux (WSL) 環境設定