Reference document:

Install on Ubuntu

  1. Install zsh: sudo apt install zsh

  2. View the system all support shell: cat /etc/shells. If zsh in the list, you can execute chsh -s $(which zsh) set zsh as default shell.

  3. Install oh-my-zsh:

    • via curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    • via wget sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  4. Reopen the shell. If it not work, try reboot the system.

  5. Now you can config the theme in ~/.zshrc:

    1
    
    ZSH_THEME="ys"
    
  6. You can install plugin:

    • autojump: sudo apt install autojump
    • zsh-autosuggestions: git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

    then add config:

    1
    2
    3
    4
    
    plugins=(... autojump zsh-autosuggestions)
    # autojump
    [[ -s /home/linfeng/.autojump/etc/profile.d/autojump.sh ]] && source /home/linfeng/.autojump/etc/profile.d/autojump.sh
    autoload -U compinit && compinit -u
    
  7. you can reopen the shell or execute zsh to make the config work.