I had been thinking about switching to Zsh for some time. I first saw it on a friend’s MacBook - he had some really convenient prompts when working with k8s. Then, when Apple made Zsh the default, I decided to try it and I fell in love pretty fast. The best part for me is the automated Git status.

An example of the Powerlevel10k Zsh theme showing Git status in the prompt.

The Powerlevel10k theme provides really nice Git repository status.

I use Git a lot, working with tens of repositories every day and I switch between often. Having an up-to-date view of the current branch helps to avoid silly mistakes like committing to main. I also use plugins for Python venv, which provide similar support. I always know which venv I’m in and what to expect.

Installation

First things first:

Install Zsh
sudo apt update
sudo apt install -y zsh

Next, change your default shell to zsh. You might need to log out and log in again, for this change to take full effect.

Switch shell to Zsh
chsh -s $(which zsh)

When you start a new terminal window, you may see an intro to the new shell like the one below, but you can ignore it, as we’re going to overwrite ~/.zshrc anyway.

Initial configuration of Zsh
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~).  This function can help you with a few settings that should
make your use of the shell easier.

You can:

(q)  Quit and do nothing.  The function will be run again next time.

(0)  Exit, creating the file ~/.zshrc containing just a comment.
     That will prevent this function being run again.

(1)  Continue to the main menu.

(2)  Populate your ~/.zshrc with the configuration recommended
     by the system administrator and exit (you will need to edit
     the file by hand, if so desired).

--- Type one of the keys in parentheses --- 2

By just switching to Zsh, you won’t see much difference. You need a bunch of plugins and good basic configuration, and the best-known set of “all you need” is called oh-my-zshexternal link .

The Oh My Zsh logo, displayed in ANSI art.

oh-my-zsh

Installation is quite straightforward. You can pipe the shell installation script (which is not my favorite way of doing things) or git clone it to your home directory under ~/.oh-my-zsh.

Clone Oh My Zsh
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh

You have to replace your ~/.zshrc with one that will load oh-my-zsh:

Backup and replace .zshrc
cp ~/.zshrc ~/.zshrc.pre-omz.bak
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

There’s also minimal.zshrc - choose whichever you prefer.

The installation script does all of that and guides you a bit, so check the official docsexternal link for more details, as they should be more up-to-date than my post.

Now it’s worth configuring it to your needs. I usually start with plugins; check this section in your ~/.zshrc file:

plugins=(git docker pyenv fzf scw virtualenv poetry golang)

Spend some time in the ~/.oh-my-zsh/plugins directory to review what else you might want to use.

Now it’s time for a theme. Although the default omz theme is fine, my favorite is powerlevel10kexternal link . Follow its installation guideexternal link .

Before you start using it, you need a dedicated font. Seriously! It will then nicely present all statuses and more. Of course, I prefer a manual installationexternal link .

Install Powerlevel10k fonts
mkdir -p ~/.local/share/fonts
curl -L -o "~/.local/share/fonts/MesloLGS NF Regular.ttf" https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
curl -L -o "~/.local/share/fonts/MesloLGS NF Bold.ttf" https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
curl -L -o "~/.local/share/fonts/MesloLGS NF Italic.ttf" https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
curl -L -o "~/.local/share/fonts/MesloLGS NF Bold Italic.ttf" https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -f -v

Now it’s time to enable the theme. For that, set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc. Start a new terminal, and Powerlevel10k will run a configuration wizard that will ask you a few questions about your preferences.

Powerlevel10k configuration wizard
   This is Powerlevel10k configuration wizard. You are seeing it because you haven't
  defined any Powerlevel10k configuration options. It will ask you a few questions and
                                 configure your prompt.

                    Does this look like a diamond (rotated square)?
                      reference: https://graphemica.com/%E2%97%86

                                     --->    <---

(y)  Yes.

(n)  No.

(q)  Quit and do nothing.

Choice [ynq]:

Those two squares between the arrows will show you some “icon” looking images if you configured your fonts right.

You can always re-run it with:

Re-run Powerlevel10k configuration
p10k configure

If you’re like me, you will run it multiple times until you find the best setup.

One more thing is worth noticing. Powerlevel10k uses additional caching for an “instant prompt”external link . This allows you to start working with the shell even before all plugins are loaded, which gives the impression of an instant kick. It might require keeping an eye on how much stuff you source during startup.

If you’re an addicted user of Ctrl+r for history scanning, you should also check out fzfexternal link . I keep a really long history to make maximum use of it.

Now, working with the shell has gained new colors, statuses, and become more fun. I can still work with bash, mostly on servers or in CI/CD, but for any of my PCs, this setup is one of the first things I repeat.