DEV Community

Cover image for How to upgrade your shell and prompt in Kali or Parrot
Raz
Raz

Posted on

How to upgrade your shell and prompt in Kali or Parrot

This article was also published on razcodes.dev

The following procedure was tested in Kali Linux and Parrot OS, but it should work the same in other places, such as Ubuntu or Debian.

I spend a lot of time in the terminal, both at work and home, so might as well have a good looking and useful terminal in front of me. I had this setup on my mac for a while and only recently I decided to move it over to my pentesting boxes.

The things that we are going to now do are the following:

  • switch the shell from BASH to ZSH
  • install Oh My Zsh
  • install MesloLGS NF fonts
  • install powerlevel10k theme

The $SHELL

This step is the easiest one. Open a terminal and issue the following command:

chsh -s $(which zsh)

You will probably have to log out and log back in for the changes to take effect. Once you do, open a terminal again and you will be welcomed by a question about being the first time you setup ZSH so just chose option 2, to populate your config file with the default settings.

Oh My Zsh

This framework is amazing, with so many plugins, feature and add-ons. You should totally dig more into it if you haven't already and look at the possibilities.

You can install it using their installer, with the following command:

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

Powerlevel10k

Fonts

This is the actual eye candy part of the process. We are going to start by installing some fonts that contain icons that will be used by the theme. This can be achieved in many ways, but here is my process. This will download the fonts to a local folder and install them on your system.

mkdir ~/.local/share/fonts
cd  ~/.local/share/fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
fc-cache -f -v

Once this is done, quit terminal and open it back up. Now go to File -> Preferences and set the terminal font to MesloLGS NF

Theme

Now we can install the theme by cloning the git repo and then making the change in the config file.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i 's/robbyrussell/powerlevel10k\/powerlevel10k/g' ~/.zshrc

You can log out of the terminal and log back in and it's customization time. Here you can chose whatever you want to make it look how you like it the most. Here are the buttons that I pressed to get the prompt I love:

y,y,y,y,3,1,2,1,1,1,2,3,4,4,1,2,2,y,3,y

Resources

https://www.kali.org/

https://parrotlinux.org/

https://github.com/ohmyzsh/ohmyzsh

https://github.com/romkatv/powerlevel10k

Top comments (0)