How To Install Zsh On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Zsh On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

zsh

Z SHell.
`bash` and `sh`-compatible command line interpreter.

Maintainer: Debian Zsh Maintainers



Section: shells

Install zsh

  • Debian apt-get install zsh Click to copy
  • Ubuntu apt-get install zsh Click to copy
  • Alpine OS apk add zsh Click to copy
  • Arch Linux pacman -S zsh Click to copy
  • Kali Linux apt-get install zsh Click to copy
  • CentOS yum install zsh Click to copy
  • Fedora dnf install zsh Click to copy
  • Raspbian apt-get install zsh Click to copy
  • macOS brew install zsh Click to copy

Z SHell. `bash` and `sh`-compatible command line interpreter.

How to use zsh?

Below are few example commands for zsh that you can use in the terminal.

Start interactive command line interpreter:
zshClick to copy
Execute command passed as parameter:
zsh -c commandClick to copy
Run commands from file (script):
zsh fileClick to copy
Run commands from file and print them as they are executed:
zsh -x fileClick to copy
Installation of latest zsh command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.