Installing ZSH

C. Michael Murphey edited this page Jan 4, 2017 · 20 revisions

Zsh?

Oh-My-Zsh is a framework for Zsh, the Z shell.

  • In order for Oh-My-Zsh to work, Zsh must be installed.
    • Please run zsh --version to confirm.
    • Expected result: zsh 4.3.9 or more recent
  • Additionally, Zsh should be set as your default shell.
    • Please run echo $SHELL from a new terminal to confirm.
    • Expected result: /bin/zsh or similar

Install and set up zsh as default

If necessary, follow these steps to install Zsh:

  1. There are two main ways to install Zsh
  2. Verify installation by running zsh --version. Expected result: zsh 4.3.9 or more recent.
  3. Make it your default shell: chsh -s $(which zsh)
  4. Log out and login back again to use your new default shell.
  5. Test that it worked with echo $SHELL. Expected result: /bin/zsh or similar.

HowTo install zsh in many platforms

macOS

brew install zsh zsh-completions

Assuming you have Homebrew installed. If not, most versions of macOS ship zsh by default, but it's normally an older version.

Try zsh --version before installing it from Homebrew. If it's newer than 4.3.9 you might be OK. Preferably newer than or equal to 5.0.

Ubuntu, Debian & derivatives

apt install zsh

If you don't have apt, the recommended package manager for end users [1] [2] [3] [4] , you can try apt-get or aptitude.

Other distributions that apply include: Linux Mint, elementary OS, Zorin OS.

OpenSUSE

zypper install zsh

Arch Linux

pacman -S zsh

Void Linux

xbps-install zsh

FreeBSD

To install the package:

pkg install zsh

To install the port:

cd /usr/ports/shells/zsh/ && make install clean

To improve zsh performance, optionally enable zsh-mem options with

make config

before running "make install".

Add yours

If you know a platform that is not covered, edit this page and add it!