Configure Your Terminal With Zsh & Oh My Zsh

Eduardo Tordecilla Paez
5 min readJan 18, 2021

Zsh is a powerful command interpreter, based on UNIX-type operating systems such as GNU / Linux and OS X (debian, ubuntu, fedora, MacOS, etc.) and Oh My Zsh is a framework that allows us to extend the functionalities of Zsh by configuring plugins.

Why should I finish reading?

The reasons apparently are not obvious yet, but as we know, programming in a certain way is an art, which does not flow if we do not have an inspiring environment. This will help you build that comfortable space, in which you can show all your skills and brag with your colleagues. We hope to specify these points at the end of the reading.

  • Install the new Zsh shell.
  • Configure Oh My Zsh.
  • Set a theme for our terminal (Design).
  • Surprise bonus.

That’s how all this magic works

We call a command interpreter a software that allows users to communicate instructions to the operating system through a terminal, so we can say that this is Zsh, a dark and beautiful place that allows us to talk about you to you with our computer system, for example, listing files, editing documents, navigating directories, and everything you do in the operating system interface.

This is a tool that developers must always carry inside the box, because much of the work is focused on this … well, if you are mainly from the Linux world. With Zsh you make this tool a fun space to execute commands and develop your tasks.

The tutorial is based on an operating system with the apt-get package manager specifically Debian, although this is not a problem, the steps to follow in another operating system are very similar.

Install Zsh

To install this shell is very simple, these are the steps to follow.

first we download and install the Zsh package

sudo apt-get install zsh -y

After finishing the installation, check the version (Expected result Zsh 5.4.2 or>), we set Zsh as the default terminal and restart the computer, like this.

zsh — version && chsh -s $(which zsh) && reboot

After the system restarts, open your terminal, you will notice a message like the following, in which you must enter the option to choose, typing the character that represents it and pressing the enter key (I recommend number 2 to prevent configuration problems)

Terminal Zsh installed with the default settings

If you have installation problems or your operating system does not support apt-get, you can go here.

Configure Oh My Zsh

Oh My Zsh is a framework which allows us to add a design theme to the console and add plugins, which allow us to extend the functionalities of our terminal or command interpreter.

To add Oh My Zsh we just have to carry out the following steps.

  • Download Oh My Zsh from its official repository
sh -c “$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)”

When you press enter, all the complements begin to be downloaded, at the end we can see the message that everything has been a success and also the theme has been changed automatically.

You have already added Oh My Zsh and you can play with all the new functionalities of your terminal. Easy right…

Configure a theme for our terminal

Like any good Developer, things by default do not go very well for us, right? For this reason we will now proceed to add a custom theme.

The first thing you should do is go to Here to choose the topic that you like.

For this example I will add a theme called Agnoster which is one of the most used by the community. To add this topic, the first thing we have to do is open the Zsh configuration file which is located in the following path /home/${your user}/ Zshrc which is the file where all the Zsh configuration is found.

We can open it with the preferred text editor, I will use Nano, and we change the name of the variable ZSH_THEME with the name of the theme we choose.

ZSH_THEME we set the variable with the preferred theme

When we finish making the changes we restart the terminal and we can see the result, in my case the result is not what we expected, this is because some themes need specific fonts (fonts) to be able to adapt the characteristics of the theme to the terminal. this is my lousy result.

Agnoster theme result without font

To solve this problem, we will proceed to install the fonts, the font that is needed in this case is the powerline call, to install it we just have to download the font package (apt-get).

sudo apt-get install fonts-powerline

We restart…. and voila, we have our new terminal.

If you have problems or want to go deeper you can go to the following links.

Surprise bonus

If you are one of those who does not conform, I recommend you install the sudo xfce4 terminal which allows you to make more advanced configurations to your terminal, such as changing the font, putting an image background, among many other things.

You can terminal with a very pleasant environment to work.

My shell

I hope and you are happy with your new work environment and enjoy that beautiful work that you do most of your days {{coding}}.

If you have problems, leave a comment or write to me on one of my social networks and we will try to solve it…

--

--

Eduardo Tordecilla Paez

Eduardo works as a web application developer and participates in the development of applications in different areas