Bash ships as the standard terminal interpreter on nearly every Linux system — but it isn’t your only option. The Z shell, better known as Zsh, brings smarter tab completion, better pattern matching, theme support, and a rich plugin ecosystem. This guide walks you through a complete Zsh install and framework setup on any major Linux distribution.
What Makes Zsh Worth Trying?
Paul Falstad created Zsh in 1990 at Princeton University. It borrows the best parts of Bash, Ksh, and Tcsh while adding its own extras. Kali Linux and macOS already ship it as their primary interpreter. Here’s what it offers:
| Capability | What It Does |
|---|---|
| Smart Tab Completion | Fills in commands, filenames, and arguments based on context |
| Extended Pattern Matching | Supports richer wildcard expressions than Bash |
| Prompt Customization | Displays Git branch info, directory paths, and more |
| Plugin Ecosystem | Adds extra features through community-built extensions |
Zsh Install on Your Distribution
Zsh lives in the default repositories of most Linux systems. Open your terminal and run the command that matches your distro. After the install finishes, confirm the binary path with which zsh.
| Distribution | Command |
|---|---|
| Ubuntu / Debian / Mint | sudo apt update && sudo apt install zsh |
| Fedora / RHEL / AlmaLinux | sudo dnf install zsh |
| Arch / Manjaro / EndeavourOS | sudo pacman -S zsh |
On Arch-based systems, pacman handles the entire process automatically. You can verify the installed version with zsh --version once it completes. For a full reference on Zsh’s available flags and options, the man page covers them in detail.
Switching Your Login Shell
Once Zsh is installed, set it as your primary shell using the chsh command, which changes the user login shell:
chsh -s $(which zsh)
Enter your user password when prompted, then log out and back in to activate the change. On first launch, Zsh presents a configuration prompt. Press 0 to generate a blank ~/.zshrc file and move forward.
Setting Up the Oh-My-Zsh Framework
Oh-My-Zsh is a free, community-maintained framework that simplifies Zsh configuration. It bundles dozens of themes and plugins so you don’t have to set everything up manually. Before running the installer, make sure git, curl, and wget are present on your machine, then run:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Adding a Custom Theme
Oh-My-Zsh defaults to the “robbyrussell” theme. A widely used alternative is Powerlevel10k. Clone it and point your config to it:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc
Open a fresh terminal session and the Powerlevel10k configuration wizard will appear to walk you through the setup.
Activating Plugins
Plugins extend what Zsh can do. The Zsh module system supports both built-in and community extensions. For example, zsh-autosuggestions predicts commands as you type. Clone it into your plugins folder:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Then open ~/.zshrc and add it to the plugins array:
plugins=(git zsh-autosuggestions)
Run omz reload to activate.
Tips for Daily Use
Create shorthand aliases to speed up repeated tasks. Add lines like alias lsa='ls -al' to ~/.zshrc, then run source ~/.zshrc to load them. Keep your Zsh install current by upgrading through your package manager regularly, and back up ~/.zshrc with Git so your settings are never lost.
Removing Zsh
To reverse the install, switch back to Bash first with chsh -s $(which bash), then uninstall the package. Remove the Oh-My-Zsh framework with uninstall_oh_my_zsh, and delete leftover config files:
rm -rf .zsh* .p10k.zsh
FAQs
Does a Zsh install affect my existing Bash scripts?
No. Scripts with a #!/bin/bash shebang line still run with Bash. Changing your interactive shell to Zsh leaves all Bash scripts and configuration files intact.
How do I check if Zsh installed correctly?
Run zsh --version in your terminal. You should see a version number of 5.0.8 or higher. Then run echo $SHELL after switching to confirm Zsh is active.
Can I use my Bash aliases in Zsh?
Not automatically. You need to copy or migrate your aliases from ~/.bashrc into ~/.zshrc. Zsh syntax is mostly compatible with Bash, though minor differences may require small adjustments.
What if chsh isn’t available on Fedora?
Fedora doesn’t include chsh by default. Use lchsh instead, or install the util-linux-user package to get chsh and then proceed as normal.
How do I update Oh-My-Zsh after installation?
Run omz update in your terminal. For plugins and themes installed manually via Git, update them individually inside their respective directories using git pull.