INTRO

A few days back, I told you about Oh My ZSH framework. It was such a great framework for customization. I also told you a very popular and beautiful theme “Power-Level-10k” which makes your terminal more cool and pretty. But in today’s article, you will learn to customize Bash with Oh My Bash. there is another framework called “Bash-It”. You can use it too. But we are going to use Oh My Bash framework.

For this tutorial, All you required is a bash shell which comes already in almost all Linux distributions. I would like to recommend to you my previous post on ZSH shell, Click Here. but still, I will teach every concept of shell and other things like I did in my previous post(ZSH).

SETUP

First, let’s check the available shells in our Linux. Type this command:

cat /etc/shells

Output must be like:

My default shell is ZSH. But if you want to know your default shell, you can type this command:

echo $SHELL

Screenshot:

 

Now we can visit the Oh My Zsh website to read some stuff there: LINK

Screenshot:

Now you can see the reason behind people using ZSH instead of bash. bash has only 53 themes and 6 plugins where ZSH 257 plugins and over 150 themes. But Bash is still popular and useful in some case. for example automation. I am not saying that you can’t automate things in ZSH. but sometimes it doesn’t work. you can’t work too much with bash scripting in ZSH.

Ok, type this command:

help test

In ZSH:

In Bash:

And you can see the difference. well, my suggestion is to use Bash instead of ZSH for shell scripting.

Now we need to install the Oh My Bash in our Linux Operating System. So, to do that go to the GitHub page of Oh My Bash and copy the installation command. type this command to install the Oh My Bash in your Linux:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"

You can also use Wget instead of Curl.

sh -c "$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)"

 

Screenshot:

After installation, you will see the terminal as shown above. and now you have Oh My Bash terminal. it means that you can change the themes and add some plugins.

To change themes and add plugins, you will need to edit the .bashrc file. type this command:

nano ~/.bashrc

Now, if you want to change the theme you can type the theme name as OSH_THEME value. you must have font as the default theme.

Screenshot:

You can change the font to random so it will change the theme while opening a new Bash terminal.

You can use powerline theme which looks pretty nice.

Screenshot:

Or you can use agnoster. it is quite popular. but to use it you will need to change color scheme to solarizard.

Screenshot:

Honestly, I like powerline more. But it all your choice.  you can choose more themes from HERE.

Now, if you want to add plugins, you can add the name of the plugin in completions value. Oh My Bash doesn’t have many frameworks though. for example, if I want to add aws plugin, you can just add aws in completions.

Screenshot:

You can pick plugins from HERE.

In my next article, I will teach you about Bash colour encoding and making your own theme.

 

Thanks For Visiting.

LEAVE A REPLY

Please enter your comment!
Please enter your name here