How I made my terminal fun and handy

How I made my terminal fun and handy

Jan 21, 2021

How I made my terminal fun and handy

“Shell” if you are a Linux user, chances that you are not aware of the “shell” are slim. In case you don’t know. Let me give you a clue.

A shell is an environment where we can run commands, programs and shell scripts. It takes the input, execute the program and provide you the output.

There are number of shells available of which below mentioned are very popular,

1) Bourne Shell

2) C shell

Bourne Shell is a unix shell, which is very popular shell developed by ‘Stephen Bourne’.

C Shell is another unix shell developed by ‘Bill Joy’ which is mostly used in BSD Operating Systems like FreeBSD and OpenBSD etc..,

In this article we are going to focus on Bourne Shell which has subcategories as listed below,

Bourne Shell (sh)

Bourne Again Shell (bash)

POSIX Shell (sh)

Etc,.

Each of the above have their own advantages and features. And there is a reason for all this history.

As we are aware of the fact that in Kali,most of the work is effectively and efficiently done from the command line using the shell. And based on what shell you use, your experience may vary.

For me,I am not a big fan of the default shell in Kali which is Bourne Again Shell (bash). Not that it is bad but there are few features that I like and would love to incorporate in my day to day command line usage example command auto-suggestion and syntax highlighting. And I think you would love that too. And this can be said at any point of time why am I bringing this up now? I will answer that at the end ????

There is a shell variation called Z Shell or ZSH first written by Paul Falstad

Now let me pull up the features list of zsh from wiki quickly.

• Programmable command-line completion that can help the user type both options and arguments for most used commands, with out-of-the-box support for several hundred commands

• Sharing of command history among all running shells

• Extended file globing allows file specification without needing to run an external program such as find

• Improved variable/array handling

• Editing of multi-line commands in a single buffer

• Spelling correction and auto-fill of command names (and optionally arguments, assumed to be file names)

• Various compatibility modes, e.g. Zsh can pretend to be a Bourne shell when run as /bin/sh

• Loadable modules, providing among other things: full TCP and Unix domain socket controls, an FTP client, and extended math functions.

• The built-in where command. Works like the which command but shows all locations of the target command in the directories specified in $PATH rather than only the one that will be used.

If you have gone through the above list, you can clearly understand that there is some interesting stuff going on. Don’t you love an autocorrection option when you type a long command incorrect. Now if you like what zsh has to offer, getting it integrated into your kali is super easy barely an inconvenience. There is a program called ohmyzsh which makes this transition easy and fun. I will just quote something from ohmyz.sh website.

If you like what you just read and you want that in your terminal, Just type the below command (better copy paste) into your kali shell

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

after you type the command it will automatically download and install zsh into your linux device and your experience will never be the same and you will never think of going back.

And now let me answer the question I raised earlier, there is a change coming. At the time of writing this article, offsec just released a new update on 2020.3, letting us know that they are thinking of adopting zsh and replacing the existing bash shell. With the new 2020.3 they installed zsh already, so if you have recently installed 2020.3 and want to be an early adopter execute chsh -s /bin/zsh in your kali to put zsh as your default shell. OffSec says by 2020.4 it will be the default shell, so it’s better to get used to it before it becomes the default option. So, with the future got brightened up by zsh it is suggested to get hands on experience to understand it better. I am sure you will probably fall in love with zsh.

Oh, forgot to mention zsh can also have lots of themes to give a fresh look and feel every time you want and also can have lots of plugins to make your work easy. These are definitely the cherry on top. I will add some of the themes that I have come across to give you an idea.

References: