
Have you ever thought the default appearance of your terminal to be a little mundane? Or ever wished for having a bit more control over your terminal workflow?
Many Linux users resort to Zsh with its Oh My Zsh plugin. But if you want to stick with the evergreen bash shell, I have got just the right tool for you, Bash-it.
Just ensure that you are running Bash shell. Run the following command and see if you see YES:
[ -n "$(echo $BASH)" ] && echo YES || echo NO
Now that you know, you are using Bash or not, letโs dive into the main topic.
Bash-it Features
Bash-it is a Bash framework for using, developing and maintaining various shell scripts, custom commands, aliases and more. It is a community-driven project on GitHub. So, everything you find in it is used & tested by thousands of people and developed by many contributors.
Aliases
Bash-it comes with a huge collection of aliases used by the community. Currently, 48 alias scripts are available. To list all the aliases, use:
bash-it show alias
You can enable/disable them by:
bash-it enable alias apt
bash-it disable alias git

You can search for any aliases for a particular programming language or environment using:
bash-it search apt

Completion
Typing the whole command every single time is painful. Most of the command-line tools on Linux enable completion while installing them. So, that if you write the first two or three letters on the terminal and hit TAB, it is auto-completed.
But not all of them have it enabled. For many command-line tools, the completion scripts are written by the community developers rather than the official source.
Bash-it has a collection of those, and it gives you an easy way of enabling/disabling them:
bash-it enable completion ssh
bash-it disable completion pip
You should enable system completion for loading completion scripts provided by the system and bash-it for bash-it command completion.
Like alias, you can search if completion exists for a particular tool using:
bash-it search pip
If there is a completion available, it will be listed.

Similarly, you can list all the completions and there enabled/disabled status using:
bash-it show completions

Plugins
Bash-it comes with a bunch of plugins for various tools and purposes. Currently, there are 83 plugins available. Generally, plugins may contain:
- Helper functions for performing various complex tasks easily. E.g.: extract, git, rails, ssh etc.
- Initialization & configuration scripts that prepare tools to be ready to use. E.g.: fasd, go, node, nvm, rbenv etc.
- Dependencies for other parts of bash-it. E.g.: alias-completion, base, battery etc.
The alias-completion plugin is needed to be enabled for the completion scripts to work properly. Also, you should enable the base plugin as some other plugins depend on it.
To list all the available plugins along with the enabled/disabled status, use the command:
bash-it show plugins

Now the commands for enabling/disabling plugins are similar to what we saw before.
bash-it enable/disable plugin <plugin-name>
A cool plugin in sudo
:
bash-it enable plugin sudo
bash-it reload
What it does is, insert sudo
to the beginning of the current or previous command. All you have to do is, press ESC key twice.
Bash-it sudo plugin. Press the ESC key twice to add sudo to the current or previous command
Themes
This is the cool part. Bash-it currently has several themes available by default for your Bash prompt. Hereโs how the Ubuntu vanilla Bash prompt looks like:

Bash-it themes can show various useful information in your prompt, like:
- Git repository and other version control system information
- Python and Ruby version
- Time, battery information and so on!
Cool, isnโt it?
You can visit the official documentation to get a visual overview of all the available themes.
Once you like a particular theme, preview it on your terminal using:
bash-it preview <theme-name>
To make it permanent, open your ~/.bashrc~
file in a text editor of your choice.
nano ~/.bashrc
Now, change the value of the BASH_IT_THEME
variable to the name of the theme you have chosen.
Change Bash-It Theme
Once done, use the command below to reload.
bash-it reload
That's it! The new prompt theme will be visible for you.

Some Extra Features
Let's see some cool settings to make Bash_it looks better.
Command execution duration
You can enable the last command execution time by setting the value of BASH_IT_COMMAND_DURATION
variable to true. In the default configuration, this is true and the minimum time in seconds before command duration is displayed is set to 1. You can configure this by setting the COMMAND_DURATION_MIN_SECONDS
variable.
barbuk
theme.export BASH_IT_COMMAND_DURATION=true
export COMMAND_DURATION_MIN_SECONDS=5

Minimal git details
To avoid slowdown of the prompt while working on large git repositories, use minimal Git details:
export SCM_GIT_SHOW_MINIMAL_INFO=true
Installing Bash-it
Bash-it is fairly popular but it is not available in the default repository of distribution. You can install it directly from the GitHub master branch.
Install Bash-it
The simplest way of installing Bash-it is running the following commands:
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
cd ~/.bash-it
./install.sh
Install Bash_it in Ubuntu
Bash-it can be used and installed in various fashion. For example:
- Simply use the cloned repository (shown above).
- Fork it on GitHub, clone it and modify it as you see fit.
- Use it with a dotfiles manager, like โ dotbot (thatโs a discussion for another day).
You have to experiment with it to see how you feel comfortable.
For additional information, you can check the README file & Wiki. Even their GitHub page has plenty of information and instructions on using it.
Updating Bash_it
To update Bash_it, you can use the bash-it update
command. If you have installed from the GitHub master branch as described in the article, you have the dev version. So, to check for update, run:
bash-it update dev
If you have installed it using the stable release from GitHub releases section, use:
bash-it update stable
Uninstall Bash-it
If you don't like Bash-it, you can remove it very easily. Open a terminal and run:
cd $BASH_IT
./uninstall.sh
Once the process is completed, remove the Bash_it folder you have cloned during install.
Uninstall Bash_It
Essential Bash_it commands
Now that you know how to install and use Bash_it, let's revise some important Bash_it commands:
Commands | Description |
---|---|
bash-it update dev/stable | Update the Bash_it installation |
bash-it search <search-term> | Find out which of the plugins, aliases or completions are available for a specific scenario. |
bash-it reload | Reload your Bash profile |
bash-it restart | Restart/rerun your shell (Bash) |
bash-it doctor | Reload your bash profile and print out logs of various parts in Bash-it |
bash-it profile save my_profile | Save current profile |
bash-it profile load default | Load default profile |
bash-it profile load my_profile | Load custom profile |
bash-it show <item> | Show a list of available <item> (alias/completion/plugin). Also gives enabled/disabled status. |
bash-it enable <item> <item-name> | Enable an alias, completion, etc. Here, <item> is alias/completion/plugin |
bash-it disable <item> <item-name> | Disable an alias, completion, etc. Here, <item> is alias/completion/plugin |
bash-it preview <theme-name> | Preview the mentioned theme |
Is it worth trying?
You are kidding, right? Of course, it is. It might take you a while to figure out the workflow with Bash-it. But, in the long run, it helps a lot.
Are you going to give it a try? Have you tried Bash-it before? Share your thoughts with us.