How To Install ZSH in Kali Linux | Make Terminal Colorful

bash-to-zsh-in-debian-distro

In this article, I will show my implementations of ZSH (Z shell), which is a better shell alternative to BASH, and here I will show about themes and plugins which are suitable for everyone and how to install ZSH in Kali Linux to make terminal colorful.

What is ZSH

Zsh also is known as Z shell, is a Unix shell that that is an extended version of the Bourne Shell (sh), with many new features and supports many plugins and themes. It is the best alternative to Bash with a cool and stylish shell interface including some features of Bash. ksh and tcsh.

Why ZSH?

ZSH is an awesome shell that just makes everything a bit simpler with its plugins like auto-suggestions, syntax-completing tasks, etc. ZSH has many features like autosuggestion, spelling correction, auto jump, syntax-highlighting, or many more plugins and theme support.

Before installing Zsh: Dependencies

Packages that are supportive to Zsh you need to install it:

  • zsh – ZSH shell.
  • Oh My Zsh – it is an open-source, community-driven framework for managing your zsh configuration
  • zsh-syntax-highlighting – This package provides syntax highlighting for the shell Zsh.
  • zsh-autosuggestions – It suggests commands as you type based on history and completions.

How To Install ZSH in Kali Linux

$ sudo apt install zsh

After installing the Zsh we have to install the Oh My Zsh for cool themes and plugins.

Install oh-my-zsh

oh-my-zsh Vai Curl

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

Installing oh-my-zsh Vai wget

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

Install zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Complete Switch from BASH to ZSH

Now we have to completely switch Bash to Zsh so you have to type the following command:

$ chsh -s /bin/zsh <username>

And after that, you have to logout from the current user and log in again. Your Zsh is installed. You can check by this:

sudo nano /etc/passwd

Complete Switch from BASH to ZSH

Here you can check  your user at the end from /bin/bash to /bin/zsh. So now your user shell completely changed Bash to Zsh.

Change the Zsh Themes

Now you have installed all the dependencies which are required, so now we will change the ZSH theme you have to edit the .zshrc file to change the themes.

$ sudo nano /home/username/.zshrc

Change the Zsh Themes

Selecting a Theme

Oh-My-Zsh is the main plugin framework for ZSH, and it comes with many pre-built plugins and themes, you have to just change the name of the theme ZSH_THEME="pygmalion" and your Zsh theme will be changed.

3den.zsh-theme                 Themes: switch to using ruby_prompt_info()
Soliah.zsh-theme               fixed rvm warning
adben.zsh-theme                use https everywhere (#6574)
af-magic.zsh-theme             af-magic: fix virtualenv prompt suffix
afowler.zsh-theme              avoid forking subshell to test if user is root
agnoster.zsh-theme             agnoster: fix bzr prompt with breezy installed (#8646)
alanpeabody.zsh-theme          Themes: switch to using ruby_prompt_info()
amuse.zsh-theme                Themes: switch to using ruby_prompt_info()
apple.zsh-theme                Clean up appearance lib file and redundant `colors`
arrow.zsh-theme                use https everywhere (#6574)
aussiegeek.zsh-theme           aussiegeek theme (include showing rvm prompt)
avit.zsh-theme                 avit: fix prompt sequence (fixes #8678)
awesomepanda.zsh-theme         Fixes incorrect prompt arrow color
bira.zsh-theme                 bira: move virtualenv information (#8266)
blinks.zsh-theme               blinks theme works with light and dark Solarized
bureau.zsh-theme               Use `grep -q` for silent behavior
candy-kingdom.zsh-theme        Detect dependency plugins in candy-kingdom and kiwi themes
candy.zsh-theme                localization support for clock in candy theme
clean.zsh-theme                use https everywhere (#6574)
cloud.zsh-theme                [cloud theme] add a space (#3215)
crcandy.zsh-theme             crcandy: use 24h format in prompt (#7926)
crunch.zsh-theme              Themes: switch to using ruby_prompt_info()
cypher.zsh-theme              Fix graphical bug in cypher theme when return status is non-zero
dallas.zsh-theme              Themes: switch to using ruby_prompt_info()
darkblood.zsh-theme           Fixed darkblood theme as in issue #23.
daveverwer.zsh-theme          New theme "daveverwer", based on "geoffgarside".
dieter.zsh-theme              Change all hostname calls for $HOST or $SHORT_HOST
dogenpunk.zsh-theme           Fix git emptiness check in dogenpunk theme (#5329)
dpoggi.zsh-theme              Added 'dpoggi' theme
dst.zsh-theme                 themes: fix prompt verbosity on window resize
dstufft.zsh-theme             Fix tilde substitution in theme prompts
duellj.zsh-theme              use https everywhere (#6574)
eastwood.zsh-theme            Move current_branch() from git plugin to core lib/git.zsh
edvardm.zsh-theme            added my theme
emotty.zsh-theme             Fix emotty theme when using zsh 5.2 (#5998)
essembeh.zsh-theme           Remove all copyright information in themes. Closes #2587
evan.zsh-theme               Change description for Evan's theme to something neutral (#6304)
fino-time.zsh-theme          Themes: switch to using ruby_prompt_info()
fino.zsh-theme               Themes: switch to using ruby_prompt_info()
fishy.zsh-theme              Fix showing aws prompt for theme fishy
fletcherm.zsh-theme          add fletcherm theme; a slightly modified copy of an old tonotdo theme
fox.zsh-theme                Remove all copyright information in themes. Closes #2587
frisk.zsh-theme              Modification to the frisk theme to work with the BZR lib
frontcube.zsh-theme          Themes: switch to using ruby_prompt_info()
funky.zsh-theme              use https everywhere (#6574)
gallifrey.zsh-theme          Actions to take after repository migration is complete (#8394)
gallois.zsh-theme            Themes: switch to using ruby_prompt_info()
gentoo.zsh-theme             themes: fix prompt verbosity on window resize
gnzh.zsh-theme               Themes: switch to using ruby_prompt_info()
intheloop.zsh-theme          Remove all copyright information in themes. Closes #2587
itchy.zsh-theme             Themes: switch to using ruby_prompt_info()
jaischeema.zsh-theme        Themes: switch to using ruby_prompt_info()(How to install zsh in kali linux)
kiwi.zsh-theme              Detect dependency plugins in candy-kingdom and kiwi themes
kolo.zsh-theme              Clean up appearance lib file and redundant `colors` calls in other files
lukerandall.zsh-theme       use https everywhere (#6574)
macovsky.zsh-theme         Themes: switch to using ruby_prompt_info()
maran.zsh-theme            Remove duplicate space on the maran theme (#7454)
mira.zsh-theme             Themes: switch to using ruby_prompt_info()
nebirhos.zsh-theme         nebirhos: use short hostname in prompt
norm.zsh-theme             norm: add hg prompt (#6725)
pygmalion.zsh-theme        Use safer append to hook function arrays (#8406)
random.zsh-theme           random: remove random theme from possible themes
refined.zsh-theme          refined: reset command exec time (#6117)
robbyrussell.zsh-theme     robbyrussell: restore prompt spacing (#8148)
sunrise.zsh-theme          Upgrade some URLs to HTTPS (#8202)
superjarin.zsh-theme       Merge simplified superjarin theme
suvash.zsh-theme           Themes: switch to using ruby_prompt_info()
tjkirch.zsh-theme          themes: fix prompt verbosity on window resize
tjkirch_mod.zsh-theme      themes: fix prompt verbosity on window resize
tonotdo.zsh-theme          use https everywhere (#6574)
wedisagree.zsh-theme       Themes: switch to using ruby_prompt_info()
wuffers.zsh-theme          adding rbenv support to all the rvm themes
xiong-chiamiov-plus.zsh-theme use https everywhere (#6574)
(How to install zsh in kali linux)
zhann.zsh-theme Clean up appearance lib file and redundant `colors` calls in other files

Change the Zsh Themes location

Oh-My-Zsh plugins:

Oh My Zsh comes with a large number of plugins to take advantage of. You can take a look at the plugins directory ls /home/techdhee/.oh-my-zsh/plugins

Oh My Zsh plugins location in debian

Enabling Plugins

Once you select a plugin that you want to use with Oh My Zsh, you have to enable them in the .zshrc file. Open it with your favorite text editor and you have to see a spot to list all the plugins you want to load.

$ sudo nano /home/username/.zshrc
plugins= 
(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

oh zsh Enabling-Plugins

Save the file and use the new shell with a new theme and plugins.

 

Oh-My-Zsh-plugins-working

Finally

Thank you for reading this post and keep connected to TECH DHEE to continue enjoying excellent posts. Share your views about this post in the comment section below. If you still have any queries, throw it in the comment section. If you find this post helpful, don’t hesitate to share this post on your social network. It will only take a moment and also it is quite easy and useful for others. Check our Privacy Policy

techdhee

TECH DHEE

A geek by passion! I started my career as a Network Engineer and currently, I am working as a Network & Systems Administrator. It was probably the most fun I’ve ever had in a job. I felt like a magician and got to see the good side of people.

View all posts by TECH DHEE →

Leave a Reply

Your email address will not be published. Required fields are marked *