Parrot Linux Zsh and Oh My Zsh Setup

Zsh is the shell you are most likely already using on Parrot Linux without having configured it. A proper Parrot Linux zsh setup, with or without the Oh My Zsh framework on top, gives you smarter tab completion, a prompt that shows your git branch and exit status, syntax highlighting as you type, and history search that actually finds the long command you ran last week. This guide covers checking which shell you have, switching to zsh if needed, installing Oh My Zsh, and the handful of plugins and tweaks that are worth your time on Parrot OS.

Which shell is Parrot Linux using?

Recent Parrot releases ship zsh as the default interactive shell for new users, but a long-lived install that was upgraded from an older version may still be on bash. Do not guess; check:

echo $SHELL
ps -p $$ -o comm=

The first line shows your login shell as stored in /etc/passwd; the second shows the shell actually running in this terminal. If both say zsh you can skip to the Oh My Zsh section. If you see bash, keep reading.

Install zsh and make it your default shell

zsh is in the standard repositories, so apt handles it:

sudo apt update
sudo apt install zsh
zsh --version

Then change your login shell. chsh asks for your password and only affects your own account:

chsh -s $(which zsh)

Log out and back in for the change to take effect. The first time zsh starts without a config file it shows a text menu (the zsh-newuser-install wizard). Press q to quit it; the next section replaces that config anyway. If you want root’s shell changed too, run sudo chsh -s $(which zsh) root, but note that scripts invoked with sudo are unaffected either way. For how root and sudo are arranged on Parrot in the first place, see our Parrot Linux root password and sudo guide.

Parrot’s own zsh configuration

Before replacing anything, look at what Parrot gives you. The distribution ships a system-wide /etc/zsh/zshrc and a skeleton ~/.zshrc that provide a two-line prompt, colours, and completion. Open ~/.zshrc in an editor and read it; it is short and commented. If you only want small changes, add them at the bottom of this file and skip Oh My Zsh entirely. A few lines many Parrot users add right away:

# ~/.zshrc additions
HISTSIZE=50000
SAVEHIST=50000
setopt HIST_IGNORE_ALL_DUPS   # drop duplicate history entries
setopt SHARE_HISTORY          # share history between open terminals
setopt AUTO_CD                # type a directory name to cd into it

alias ll='ls -lah --color=auto'
alias update='sudo parrot-upgrade'
alias ports='ss -tulpn'

Reload with source ~/.zshrc. The update alias is worth a mention: on Parrot you should prefer parrot-upgrade over a bare apt upgrade, as explained in our guide to updating Parrot Linux safely.

Install Oh My Zsh on Parrot Linux

Oh My Zsh is a community framework that manages themes and plugins for zsh. It is popular because it turns a bare shell into something pleasant in under a minute. Two honest caveats first: it adds a little startup time, and the installer replaces your existing ~/.zshrc (it keeps a backup as ~/.zshrc.pre-oh-my-zsh). If you customised Parrot’s default config, copy your changes over afterwards.

You need git and curl, both of which are normally present on Parrot. Then fetch and run the installer. Pulling a script straight into a shell is a habit you should be careful with, so download it first and read it before running:

sudo apt install git curl
curl -fsSL -o /tmp/omz-install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
less /tmp/omz-install.sh
sh /tmp/omz-install.sh

The installer creates ~/.oh-my-zsh, writes a fresh ~/.zshrc and, if zsh is not already your login shell, offers to run chsh for you. When it finishes you are dropped into the new shell with the default “robbyrussell” theme. The project’s documentation and plugin list are on the Oh My Zsh site.

Pick a theme

Themes are set with the ZSH_THEME variable near the top of ~/.zshrc. Built-in themes live in ~/.oh-my-zsh/themes/; ls that directory to see the names. A few sensible choices:

  • robbyrussell – the default, minimal, shows the git branch.
  • agnoster – the classic powerline look; needs a patched font (see below).
  • bira or ys – two-line prompts that keep the command on its own line, similar in spirit to Parrot’s stock prompt.
  • random – picks a different theme every new terminal, handy for trying them out.

If you want the popular Powerlevel10k theme, it is a separate project, cloned into the custom themes folder:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Then set ZSH_THEME="powerlevel10k/powerlevel10k", open a new terminal and follow its configuration wizard. Powerline-style themes need a font with the extra glyphs. Install the packaged fonts-powerline with apt, or a Nerd Font, then select it in your terminal’s profile settings (Konsole on the KDE Plasma edition, MATE Terminal on MATE, QTerminal on LXQt).

The plugins worth enabling

Plugins are listed in the plugins=(...) array in ~/.zshrc. Oh My Zsh bundles a large set; two of the most useful are third-party and need a one-time clone. Here is a set that suits a Parrot workstation:

plugins=(
  git
  sudo
  docker
  python
  pip
  tmux
  colored-man-pages
  command-not-found
  zsh-autosuggestions
  zsh-syntax-highlighting
)

What they do:

PluginWhat it gives you
gitShort aliases such as gst (status), gco (checkout), gp (push)
sudoPress Esc twice to prepend sudo to the current or last command
dockerCompletion for container and image names
python, pipCompletion plus helpers for virtualenvs and packages
tmuxShort aliases like ta (attach) and tn (new session)
colored-man-pagesSyntax colours in man output
command-not-foundSuggests the apt package when you type a missing command
zsh-autosuggestionsGhost-text suggestions from history; press → to accept
zsh-syntax-highlightingCommands turn green when valid, red when not, before you press Enter

The last two are not bundled. Clone them into the custom plugins directory once:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Keep zsh-syntax-highlighting last in the list; it needs to load after everything else to work correctly. Reload with source ~/.zshrc or open a new terminal. If you use the Docker setup from our Docker on Parrot Linux guide, the docker plugin’s completion of container names saves a lot of copy-pasting IDs.

Keep the shell fast

A long plugin list can make new terminals feel sluggish. Measure before you blame anything:

for i in 1 2 3; do /usr/bin/time -f "%es" zsh -i -c exit; done

If startup is noticeably slow, the usual culprits are plugins that call external programs on every prompt (anything that shows version numbers of node, python or similar) and a large completion cache that needs rebuilding. Trim the plugin list, and rebuild the completion dump with rm -f ~/.zcompdump* followed by a new terminal. Powerlevel10k’s “instant prompt” option also hides most startup delay. Oh My Zsh checks for its own updates every couple of weeks; you can disable that with zstyle ':omz:update' mode disabled in ~/.zshrc and run omz update yourself when convenient.

Carry Parrot’s defaults into the new config

After installing Oh My Zsh, a few things from Parrot’s stock config will be missing. Open ~/.zshrc.pre-oh-my-zsh and compare. The items most people want back are their aliases and history settings. Paste the block from the earlier section (HISTSIZE, setopt lines, aliases) at the bottom of the new ~/.zshrc; Oh My Zsh will not overwrite it on updates. Keep an eye on ~/.zsh_history as well: it stores every command you type, including ones with passwords in arguments. On a shared or lab machine, prefix sensitive commands with a space after enabling setopt HIST_IGNORE_SPACE, and the shell will not record them. The helpme command cheat sheet in the docs section is a useful companion once your prompt is set up.

Troubleshooting

  • Strange characters or boxes in the prompt. Your terminal font lacks powerline glyphs. Install fonts-powerline or a Nerd Font and select it in the terminal profile, or switch to a plain theme like robbyrussell.
  • Tab completion for a tool stopped working. Delete ~/.zcompdump* and open a new terminal so the completion cache is rebuilt.
  • “insecure directories” warning on startup. Some plugin directory is group- or world-writable. Run compaudit to list them and fix with chmod g-w,o-w on each path shown.
  • Login shell is still bash after chsh. You have not logged out yet, or you changed root’s shell instead of your own. Check with grep $USER /etc/passwd.
  • Home/End keys do nothing inside tmux. That is a terminfo issue on the tmux side rather than zsh; our tmux on Parrot Linux guide covers the fix.
  • You want to go back to bash. Run chsh -s $(which bash), log out and in. Oh My Zsh can be removed cleanly with its uninstall_oh_my_zsh command, which also restores your backed-up config.

FAQ

Is zsh the default shell on Parrot Linux?

For new installs of recent releases, yes. Upgraded systems and some minimal images may still use bash. The reliable way to know is echo $SHELL in a terminal.

Do I need Oh My Zsh to get a good zsh setup?

No. Parrot’s shipped config is already decent, and you can add autosuggestions and syntax highlighting by installing the zsh-autosuggestions and zsh-syntax-highlighting apt packages and sourcing them from ~/.zshrc. Oh My Zsh is a convenience layer, not a requirement.

Will changing my shell break Parrot’s security tools?

No. The tools are ordinary programs and do not depend on which interactive shell launches them. Scripts with a #!/bin/bash line keep running under bash regardless of your login shell.