Oh My ZSH! 👨‍💻

Oh My ZSH! 👨‍💻

How to make the Linux terminal more productive.

Linux is an operating system that the more you use it and see the possibilities within it, the more productive your day becomes. For developers, a widely used tool is the terminal and many don’t know it but it is possible to customize it and make the interface more pleasant and with more information.

For Linux we have ZSH which is a terminal like any other but with more functions, to install to execute the command (for distros based on Ubuntu):

sudo apt install zsh

This terminal has a configuration file located at:

~/.zshrc

Where it is possible to define commands to be executed when starting the terminal and also customize the interface, I recommend installing oh-my-zsh together with the powerlevel10k theme. Your terminal’s interface will look like the one on the cover of this post, making it possible to customize it.

To make your terminal like this, the first step is to install oh-my-zsh, it has a very detailed page on how to install it and you probably won’t have any problems here, the installation commands are:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

For better compatibility with the powerlevel10k theme, it is recommended to install “Nerd fonts”, which are fonts with more icons and special characters, the theme suggests installing meslo-nf, to install on Linux just download the file, double click and click install.

Nerd Fonts

MesloLGS NF Regular.ttf MesloLGS NF Bold.ttf MesloLGS NF Italic.ttf MesloLGS NF Bold Italic.ttf

Don’t worry, there are just a few steps left to have a tuned terminal, after installing the fonts you need to change the default font for the “terminal” application and this can change between distros but in Zorin OS it is possible to do this through menu > preferences > profiles > text. Now that’s done, another sequence of commands in the terminal to download and install powerlevel10k:

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

Find the line: ZSH_THEME="robbyrussell" and change to: ZSH_THEME="powerlevel10k/powerlevel10k"

After these steps, a menu should be displayed where you can configure how you want your terminal to look. Here I recommend you test different options (you can go back to this step and change the choices) adapting to what you like best but to stay as In the image of this post you need to select the following options:

Powerlevel10k Config

yyyy31211112n1y

If you want to change the settings later, just run the command: powerlevel10k config. Okay, after these steps your terminal is configured and ready to use, the last command I recommend is to set ZSH as default, this way every time you open a new instance all the settings made in this post will be loaded, to do this just run:

chsh -s $(which zsh)

And that’s it, leave in the comments what you think and which theme you use in your daily life.