Skip to content

Installing ZSH

Modded Gamers edited this page Feb 3, 2020 · 54 revisions


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 5.1.1 or more recent
  • Additionally, Zsh should be set as your default shell.
    • Please run echo $SHELL from a new terminal to confirm.
    • Expected result: /usr/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
  1. Verify installation by running zsh --version. Expected result: zsh 5.1.1 or more recent.
  2. Make it your default shell: chsh -s $(which zsh)
  1. Log out and login back again to use your new default shell.
  2. Test that it worked with echo $SHELL. Expected result: /bin/zsh or similar.
  3. Test with $SHELL --version. Expected result: 'zsh 5.1.1' or similar

How to install zsh on many platforms


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.

brew install zsh

To set zsh as your default shell, execute the following for macOS High Sierra

chsh -s /bin/zsh

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

sudo port install zsh zsh-completions

Ubuntu, Debian & derivatives (Windows 10 WSL | Native Linux kernel with Windows 10 build 1903)

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, Raspbian, MX Linux, Deepin.


zypper install zsh

Arch Linux

pacman -S zsh

Void Linux

xbps-install zsh


dnf install zsh


To install the package:

pkg_add zsh


To install the package:

pkg install zsh

To install the port:

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

To reduce memory usage, optionally enable zsh-mem options with

make config

before running "make install".


sudo yum update && sudo yum -y install zsh


Install the zsh package using the installer. Unfortunately Cygwin doesn't have a standard command line interface.

The easiest way to change the default shell is to set your SHELL user environment variable. Search for "Edit Environment variables for your account" to bring up the environment variables window, create a new variable named "SHELL" and give it the value "/usr/bin/zsh/".

Alternatively: Open Cygwin (in BASH) then type:

sudo nano ~/.bashrc

Once the .bashrc file is open, add this line to the very top:

exec zsh

Close and save the file. Close and reopen Cygwin. It will execute the command every time you load the terminal and run your zsh shell.


eopkg it zsh


emerge app-shells/zsh

Alpine Linux

apk add zsh


pacman -S zsh

Termux (Android)

Termux is an terminal emulator for Android but has modern feature like Debian and Ubuntu (Termux has Bash shell and Busybox GNU-like programs). For the package manager, Termux using an Debian/Ubuntu package manager, APT. To install the package, run this command:

pkg install zsh

The command looks like FreeBSD package manger (pkg). Or you can run this command:

apt update && apt upgrade
apt install zsh

To set zsh as your default shell, run this command:

chsh -s /data/data/com.termux/files/usr/bin/zsh


chsh -s $(which zsh)

Add yours

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

You can’t perform that action at this time.