Guide · prerequisites

Installing ZSH

Oh My Zsh is a framework for Zsh, the Z shell — so Zsh must be installed and set as your default shell before anything else.

01Am I already set up?

Is Zsh installed?
zsh --version
Expected: zsh 5.0.8 or more recent
Is Zsh my default shell?
echo $SHELL
Expected (from a new terminal): /usr/bin/zsh or similar

02Install and set Zsh as default

  1. Install Zsh — with your package manager (sudo apt install zsh — see the platform matrix below), or from source following the Zsh FAQ instructions.
  2. Verify with zsh --version — expect zsh 5.0.8 or newer.
  3. Make it your default shell: chsh -s $(which zsh)
    On Fedora: sudo chsh $USER (recent) or sudo lchsh $USER (older). This fails if Zsh isn't in /etc/shells or you lack chsh permission — in that case use a different procedure. The new shell takes effect after you restart — or run /bin/zsh.
  4. Log out and back in to use your new default shell.
  5. Confirm: echo $SHELL/bin/zsh or similar.
  6. Double-check: $SHELL --versionzsh 5.8 or similar.

03Installing Zsh, platform by platform

macOS · try zsh --version first — most versions ship Zsh (often older); want ≥ 5.0.8
brew install zsh

Set as default (Homebrew installs): M1 Macs chsh -s $(which zsh) · Intel chsh -s /usr/local/bin/zsh · High Sierra and older chsh -s /bin/zsh. Non-standard-shell error? First run sudo sh -c "echo $(which zsh) >> /etc/shells". No Homebrew? MacPorts works too: sudo port install zsh zsh-completions.

Ubuntu / Debian & derivatives · incl. WSL
apt install zsh

No apt? Try apt-get or aptitude [1][2][3][4]. Also covers Mint, elementary, Zorin, Raspbian, MX, Deepin.

OpenSUSE
zypper install zsh
Arch / Manjaro
pacman -S zsh
Void Linux
xbps-install zsh
Fedora
dnf install zsh
OpenBSD
pkg_add zsh
FreeBSD
pkg install zsh

Or the port: cd /usr/ports/shells/zsh/ && make install clean. To reduce memory usage, optionally enable the zsh-mem options with make config before make install.

CentOS / RHEL
sudo yum update && sudo yum -y install zsh
Cygwin
apt-cyg install zsh

Cygwin has no standard CLI installer — set up apt-cyg first, or use the graphical installer. Easiest default-shell switch: create a SHELL user environment variable with value /usr/bin/zsh/ ("Edit environment variables for your account"). Alternatively open Cygwin in Bash, sudo nano ~/.bashrc, add exec zsh as the very first line, save, and reopen Cygwin — it will run Zsh on every launch.

Solus
eopkg it zsh
Funtoo / Gentoo
emerge app-shells/zsh
Alpine Linux
apk add zsh
MSYS2
pacman -S zsh
Termux · Android
pkg install zsh

Termux is a terminal emulator for Android with Debian/Ubuntu-style tooling (Bash + Busybox, APT package manager). The pkg command mirrors FreeBSD's — or use apt update && apt upgrade && apt install zsh. Set default with chsh -s zsh.

KISS Linux
kiss b zsh && kiss i zsh

Requires the community repo on your $KISS_PATH.

Slackware Linux
slackpkg install zsh
Add yours — if you know a platform that is not covered, edit this page and add it!

This wiki is automatically published from ohmyzsh/wiki — to edit this page, make your changes there and submit a Pull Request.