{"id":8189,"date":"2026-03-13T20:31:44","date_gmt":"2026-03-13T20:31:44","guid":{"rendered":"https:\/\/commandlinux.com\/?p=8189"},"modified":"2026-03-25T13:01:20","modified_gmt":"2026-03-25T13:01:20","slug":"zsh-install","status":"publish","type":"post","link":"https:\/\/commandlinux.com\/arch-linux\/zsh-install\/","title":{"rendered":"How to Do a Zsh Install on Any Linux Distro"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600&#038;display=swap\" rel=\"stylesheet\">\n<style>\n  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }\n\n  a { color: #2563eb; text-decoration: none; }\n  a:hover { text-decoration: underline; }\n\n  table {\n    width: 100%;\n    border-collapse: collapse;\n    margin: 1.25rem 0;\n    font-size: 0.95rem;\n  }\n\n  th {\n    background: #f3f4f6;\n    text-align: left;\n    padding: 0.6rem 0.9rem;\n    font-weight: 600;\n    border: 1px solid #e5e7eb;\n  }\n\n  td {\n    padding: 0.6rem 0.9rem;\n    border: 1px solid #e5e7eb;\n  }\n\n  tr:nth-child(even) td { background: #f9fafb; }\n\n  pre {\n    background: #1e1e2e;\n    color: #cdd6f4;\n    padding: 1rem 1.25rem;\n    border-radius: 8px;\n    overflow-x: auto;\n    font-size: 0.88rem;\n    margin: 0.75rem 0 1.25rem;\n    font-family: 'Courier New', Courier, monospace;\n    line-height: 1.6;\n  }\n\n  code {\n    background: #f3f4f6;\n    padding: 0.15em 0.4em;\n    border-radius: 4px;\n    font-size: 0.88em;\n    font-family: 'Courier New', Courier, monospace;\n  }\n\n  details {\n    border: 1px solid #e5e7eb;\n    border-radius: 8px;\n    margin-bottom: 0.6rem;\n    overflow: hidden;\n  }\n\n  summary {\n    padding: 0.9rem 1.1rem;\n    cursor: pointer;\n    font-weight: 500;\n    list-style: none;\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    background: #f9fafb;\n    user-select: none;\n  }\n\n  summary::-webkit-details-marker { display: none; }\n\n  summary::after {\n    content: '+';\n    font-size: 1.2rem;\n    color: #6b7280;\n    transition: transform 0.2s;\n  }\n\n  details[open] summary::after { content: '\u2212'; }\n\n  details[open] summary { background: #f3f4f6; }\n\n  details p {\n    padding: 0.85rem 1.1rem;\n    font-size: 0.95rem;\n    color: #374151;\n    margin: 0;\n    border-top: 1px solid #e5e7eb;\n  }\n<\/style>\n<\/head>\n<body>\n\n<p>Bash ships as the standard terminal interpreter on nearly every Linux system \u2014 but it isn&#8217;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.<\/p>\n\n<h2>What Makes Zsh Worth Trying?<\/h2>\n\n<p>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&#8217;s what it offers:<\/p>\n\n<table>\n  <thead>\n     <tr><th>Capability<\/th><th>What It Does<\/th><\/tr>\n  <\/thead>\n  <tbody>\n     <tr><td>Smart Tab Completion<\/td><td>Fills in commands, filenames, and arguments based on context<\/td><\/tr>\n     <tr><td>Extended Pattern Matching<\/td><td>Supports richer wildcard expressions than Bash<\/td><\/tr>\n     <tr><td>Prompt Customization<\/td><td>Displays Git branch info, directory paths, and more<\/td><\/tr>\n     <tr><td>Plugin Ecosystem<\/td><td>Adds extra features through community-built extensions<\/td><\/tr>\n  <\/tbody>\n<\/table>\n\n<h2>Zsh Install on Your Distribution<\/h2>\n\n<p>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 <code>which zsh<\/code>.<\/p>\n\n<table>\n  <thead>\n     <tr><th>Distribution<\/th><th>Command<\/th><\/tr>\n  <\/thead>\n  <tbody>\n     <tr><td>Ubuntu \/ Debian \/ Mint<\/td><td><code>sudo apt update && sudo apt install zsh<\/code><\/td><\/tr>\n     <tr><td>Fedora \/ RHEL \/ AlmaLinux<\/td><td><code>sudo dnf install zsh<\/code><\/td><\/tr>\n     <tr><td>Arch \/ Manjaro \/ EndeavourOS<\/td><td><code>sudo pacman -S zsh<\/code><\/td><\/tr>\n  <\/tbody>\n<\/table>\n\n<p>On Arch-based systems, pacman handles the entire process automatically. You can verify the installed version with <code>zsh --version<\/code> once it completes. For a full reference on Zsh&#8217;s available flags and options, the man page covers them in detail.<\/p>\n\n<h2>Switching Your Login Shell<\/h2>\n\n<p>Once Zsh is installed, set it as your primary shell using the <code>chsh<\/code> command, which changes the user login shell:<\/p>\n\n<pre>chsh -s $(which zsh)<\/pre>\n\n<p>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 <code>0<\/code> to generate a blank <code>~\/.zshrc<\/code> file and move forward.<\/p>\n\n<h2>Setting Up the Oh-My-Zsh Framework<\/h2>\n\n<p>Oh-My-Zsh is a free, community-maintained framework that simplifies Zsh configuration. It bundles dozens of themes and plugins so you don&#8217;t have to set everything up manually. Before running the installer, make sure <code>git<\/code>, <code>curl<\/code>, and <code>wget<\/code> are present on your machine, then run:<\/p>\n\n<pre>sh -c \"$(curl -fsSL https:\/\/raw.github.com\/ohmyzsh\/ohmyzsh\/master\/tools\/install.sh)\"<\/pre>\n\n<h3>Adding a Custom Theme<\/h3>\n\n<p>Oh-My-Zsh defaults to the &#8220;robbyrussell&#8221; theme. A widely used alternative is Powerlevel10k. Clone it and point your config to it:<\/p>\n\n<pre>git clone --depth=1 https:\/\/github.com\/romkatv\/powerlevel10k.git ~\/powerlevel10k\necho 'source ~\/powerlevel10k\/powerlevel10k.zsh-theme' >> ~\/.zshrc<\/pre>\n\n<p>Open a fresh terminal session and the Powerlevel10k configuration wizard will appear to walk you through the setup.<\/p>\n\n<h3>Activating Plugins<\/h3>\n\n<p>Plugins extend what Zsh can do. The Zsh module system supports both built-in and community extensions. For example, <code>zsh-autosuggestions<\/code> predicts commands as you type. Clone it into your plugins folder:<\/p>\n\n<pre>git clone https:\/\/github.com\/zsh-users\/zsh-autosuggestions ${ZSH_CUSTOM:-~\/.oh-my-zsh\/custom}\/plugins\/zsh-autosuggestions<\/pre>\n\n<p>Then open <code>~\/.zshrc<\/code> and add it to the plugins array:<\/p>\n\n<pre>plugins=(git zsh-autosuggestions)<\/pre>\n\n<p>Run <code>omz reload<\/code> to activate.<\/p>\n\n<h2>Tips for Daily Use<\/h2>\n\n<p>Create shorthand aliases to speed up repeated tasks. Add lines like <code>alias lsa='ls -al'<\/code> to <code>~\/.zshrc<\/code>, then run <code>source ~\/.zshrc<\/code> to load them. Keep your Zsh install current by upgrading through your package manager regularly, and back up <code>~\/.zshrc<\/code> with Git so your settings are never lost.<\/p>\n\n<h2>Removing Zsh<\/h2>\n\n<p>To reverse the install, switch back to Bash first with <code>chsh -s $(which bash)<\/code>, then uninstall the package. Remove the Oh-My-Zsh framework with <code>uninstall_oh_my_zsh<\/code>, and delete leftover config files:<\/p>\n\n<pre>rm -rf .zsh* .p10k.zsh<\/pre>\n\n<h2>FAQs<\/h2>\n\n<details>\n  <summary>Does a Zsh install affect my existing Bash scripts?<\/summary>\n  <p>No. Scripts with a <code>#!\/bin\/bash<\/code> shebang line still run with Bash. Changing your interactive shell to Zsh leaves all Bash scripts and configuration files intact.<\/p>\n<\/details>\n\n<details>\n  <summary>How do I check if Zsh installed correctly?<\/summary>\n  <p>Run <code>zsh --version<\/code> in your terminal. You should see a version number of 5.0.8 or higher. Then run <code>echo $SHELL<\/code> after switching to confirm Zsh is active.<\/p>\n<\/details>\n\n<details>\n  <summary>Can I use my Bash aliases in Zsh?<\/summary>\n  <p>Not automatically. You need to copy or migrate your aliases from <code>~\/.bashrc<\/code> into <code>~\/.zshrc<\/code>. Zsh syntax is mostly compatible with Bash, though minor differences may require small adjustments.<\/p>\n<\/details>\n\n<details>\n  <summary>What if <code>chsh<\/code> isn&#8217;t available on Fedora?<\/summary>\n  <p>Fedora doesn&#8217;t include <code>chsh<\/code> by default. Use <code>lchsh<\/code> instead, or install the <code>util-linux-user<\/code> package to get <code>chsh<\/code> and then proceed as normal.<\/p>\n<\/details>\n\n<details>\n  <summary>How do I update Oh-My-Zsh after installation?<\/summary>\n  <p>Run <code>omz update<\/code> in your terminal. For plugins and themes installed manually via Git, update them individually inside their respective directories using <code>git pull<\/code>.<\/p>\n<\/details>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Bash ships as the standard terminal interpreter on nearly every Linux system \u2014 but it isn&#8217;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<\/p>\n","protected":false},"author":1,"featured_media":8190,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"class_list":["post-8189","post","type-post","status-publish","format-standard","has-post-thumbnail","category-arch-linux"],"_links":{"self":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/8189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/comments?post=8189"}],"version-history":[{"count":2,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/8189\/revisions"}],"predecessor-version":[{"id":8610,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/8189\/revisions\/8610"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/media\/8190"}],"wp:attachment":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/media?parent=8189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/categories?post=8189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/tags?post=8189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}