Skip to main content

Installing OhMyZsh on Linux / MacOS

  1. Install zsh. For MacOS systems after Catalina, the default shell is zsh, so this step can be skipped. Just install git.
apt-get update && apt-get install -y \\
    curl \\
    git \\
    zsh
  1. Install ohmyzsh.
sh -c "$(curl -fsSL <https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh>)"
  1. Install zsh auto-suggestion and syntax highlighting plugins.
mkdir -p ~/.zsh # Create a .zsh folder in the root directory to store the two plugins
git clone <https://github.com/zsh-users/zsh-autosuggestions> ~/.zsh/zsh-autosuggestions
git clone <https://github.com/zsh-users/zsh-syntax-highlighting> ~/.zsh/zsh-syntax-highlighting
  1. Export the plugin paths to the .zshrc file.
echo source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh >> ~/.zshrc && echo source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh >> ~/.zshrc
  1. Reload the .zshrc file.
source ~/.zshrc