INTRO

The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, KSH, and Tcsh.

You can say that it is more useful and handy than the Bash that you use. the bash is always a default shell for most Linux that I know of. It was written in C language. But this won’t give your terminal the look as shown in the thumbnail. you will need the ZSH framework named Oh My ZSH.

Oh My ZSH is a delightful, open-source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make your terminal power, beautiful and attractive.

Oh My ZSH is not the only framework that you can use for the ZSH, but there are also some other frameworks, for example, Zplug. you can search more by yourself using Google. but today, we are talking about Oh my ZSH, because it is being used by many people.

 

SETUP

First, we will take a look at the available shells. Type this command:

cat /etc/shells

Output on Terminal:

you may not have pwsh nad tmux and the obviously the ZSH. I have ZSH because I have already installed it. In Kali Linux, bash is the default shell for the terminal.

one more thing, I had customized my .bashrc which is causing the colors in terminal(hostname and root). you can do it too. I am telling you this so you may not get confused. It is a fully functional Bash shell.

we will need to install ZSH to change Our shell. type this command:

apt install zsh

I have already installed it. that is why the output is a little bit odd.

After installation,  we will look again at our available shells:

cat /etc/shells

you must have zsh in the output this time.

Now that you have zsh shell, you can change the shell by typing the name of the shell. for example, we want to use the zsh so we will type ” zsh”  in the terminal.  but if you do that now, you will see a very ugly terminal that you never wanted.

To make our terminal look beautiful and attractive, we will require a zsh framework. I am going to use Oh My Zsh!. you can visit the Oh My Zsh Github and see the themes and plugin that comes with this framework.

Go to GitHub Page and look around things:  github.com/ohmyzsh/ohmyzsh

Type this command in the terminal:

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

This command will install the Oh My Zsh in you Linux.

 

Now that you have zsh and Oh My ZSH both, we can go further. it’s time to install the powerlevel10k theme.

Go to Powelevel10k GitHub page and look around things: github.com/romkatv/powerlevel10k

Download Powerlevel10k for Oh My ZSH with this command:

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

 

After downloading this, you will need to change the theme via .zshrc file. .zshrc file is like.bashrc file which is used your bash customization.

Type this command to open .zshrc file:

leafpad ~/.zshrc

 

can you see “ZSH_THEME=”<ANY THEME>”. just replace the ZSH_theme value with powerleve10k/powerlevel10k

ZSH_THEME="powerlevel10k/powerlevel10k"

I will highly suggest restarting your Kali Linux after installing this theme. the first time, it will ask you some general questions that will be necessary to set up this terminal theme properly.

 

you may need some plugins of the Oh My ZSH to increase the performance of ZSH. You can take a look at this page.

To enable a plugin, you will need to add the plugin name in the .zshrc file.

for example, we want to add docker plugin.

Type this command to open the .zshrc file:

leafpad ~/.zshrc

Now you need to type “docker” in the “plugins=(git)” without the comma.

it will look like this:

plugins=(git docker)

 


 

One more thing that you can do is change the theme of Terminal

(built-in schemes)

Screenshot:

 

Note– I faced some problems with ZSH while spawning an interactive shell. besides, this theme is not correctly working for Tmux. but it is all your choice if you want to install it or not. I haven’t found any solutions to these problems. I will let you know if I got any solutions.

 

 

Stay home, stay safe, and keep reading our articles.

Thanks For Visiting

LEAVE A REPLY

Please enter your comment!
Please enter your name here