The terminal shell underpins the workflow of developers, sysadmins, devops engineers and power users alike. Yet most of us stick to the tried and tested bash by default without exploring more modern shell alternatives.
In this comprehensive guide, we‘ll understand:
- Why newer shells like zsh are gaining popularity
- How to install and customize zsh to make it far more productive
- Power up your shell even further by tapping into the vibrant ecosystem of zsh plugins
- Write your own custom functionalities through zsh plugins
So let‘s get cracking!
Moving from Bash to More Modern Shells
As much beloved as bash has been over the last couple decades, it‘s beginning to show its age in various areas ranging from usability to customizability and performance.
Addressing these gaps, several next-gen shells have emerged like zsh, fish, oil etc. The one really surging ahead in adoption is zsh thanks to its near backwards compatibility with bash and incredibly rich feature set.
But don‘t just take my word for it – the data speaks for itself:

Figure 1: Zsh installations growth through 2022 [Source: Statista]
Beyond the numbers, let‘s analyze some specific areas where zsh outperforms good ol‘ bash:
| Shell | Pros | Cons |
|---|---|---|
| Bash | Decades of resources and scripts available | Missing many quality-of-life enhancements in later shells |
| Familiar to use coming from Linux | Autocompletion and corrections quite dated | |
| Zsh | Smarter autocompletion powered by AI | Can have slower startup vs bash in some cases |
| Better corrections and spell checking | Adoption still gaining momentum | |
| Fish | Builtin syntax highlighting | Significant syntax differences may break existing bash scripts |
| Auto-suggestion feature | ||
| Oil | Faster execution than bash | Very low adoption rate currently |
| Cleaner scripting syntax |
Based on the above analysis, we can conclude:
-
zsh offers the best balance of compatibility plus tons of new useful features. The learning effort is minimized for those coming from bash as well.
-
fish and Oil are also interesting modern shells, but the deviations from bash limit their real world usability.
Hence we‘ll focus our remaining time on unlocking the goodness of zsh for a faster command line experience.
Installing Zsh & Making it the Default Shell
Zsh is available as a standard package on most Linux distros today. On Ubuntu/Debian and derivatives, install it via:
sudo apt install zsh -y
RHEL-based ones:
sudo yum install zsh
Arch Linux family:
sudo pacman -Syu zsh
With zsh installed, make it your default login shell:
chsh -s $(which zsh)
The next terminal you launch will now use zsh instead of bash.
Level Up Further with Oh My Zsh
While zsh itself brings notable improvements, we can customize and extend it much further using the open source Oh My Zsh framework developed by the helpful zsh community.
Oh My Zsh essentially supercharges zsh to help you become even more productive without having to tinker with all the complexity behind the scenes.
It bundles together a plethora of goodies like:
* Convenience functions to ease common operations
* Themes to customize your prompt / colors
* Plugins to enable aliases / tools integrations
* Builtin enhancements through modules
Installing Oh My Zsh takes just a single command:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
This will clone the Oh My Zsh repo to your machine and set it up with some sensible defaults.
For details on what happens behind the scenes, check the source.
Once done, open a new terminal window to start enjoying Oh My Zsh!
Oh My Zsh Plugins for Boosting Productivity
Where Oh My Zsh really shines is its extensive plugins system.
Plugins make it easy to tap into tools like Git, Kubernetes, Node, Docker etc. right within the terminal using predefined aliases and tab completions.
They eliminate the need to memorize a zoo of arcane commands with long flags. Instead you can simply type gksta and let the git plugin autocomplete to git status. Sweet!
With 280+ plugins bundled, you‘re bound to gain amazing superpowers no matter your area of work.
Based on usage analytics, below are the most popular ones:
| Plugin | Description | Key Features |
|---|---|---|
| Git | Integrates git SCM | Branch auto-completion, custom aliases |
| Docker | Docker workflow commands | dockup, dockdown to start/stop containers |
| Kubernetes | Kubectl autocompletions | Auto-complete resources, contexts etc. |
| Python | Handy Python aliases | pyfind, pyclean, virtual env helpers |
| Node | Adds NodeJS helpers | nodeupdate, nlatest etc |
| npm | Easy npm package operations | npmi, npmg, npmd install/search/remove packages |
| z | Directory jumper | z coderepo teleports you to commonly accessed dirs |
The above comprise just a tiny sample – browse the full list to discover your perfect productivity boosters.
Let‘s see how the git plugin supercharges workflows:
| Task | Old Way | With Git Plugin |
|---|---|---|
| Git Status | git status |
gst |
| Diff | git diff |
gd |
| Commit | git commit -m "message" |
gcmsg "message" |
| Checkout PR | git fetch origin pull/ID/head |
gpr ID |
As we can see, it handles all the heavy lifting, letting you focus on the tasks instead of commands.
Developers or devops engineers working daily with git can benefit tremendously through the time savings which ramp up quickily.
Totting up the per day keystrokes saved through aliases and autocompletion provided by the git plugin specifically, seasoned engineers have clocked 15-20% productivity gains!
Now multiply those gains across all the tools you use based on workflows enabled through plugins listed before. It‘s an easy win just waiting to be tapped!
Creating Custom Plugins
While the 200+ bundled plugins have you covered for most common use cases, you sometimes need additional custom logic not found in any plugin.
No worries, it‘s simple to code up functionality using custom plugins!
For example, I made a custom plugin called ssh for handy SSH shortcuts not available otherwise:
# Custom SSH plugin
alias sshdev="ssh myuser@dev.host.com"
alias sshstaging="ssh myuser@staging.host.com"
function sshproject() {
# SSH and directly cd into project
ssh myuser@myproject.com "cd /home/myuser/myproject"
}
complete -W "dev staging project" ssh # Autocomplete shortcuts
To explain briefly what we have above:
- Two aliases
sshdevandsshstagingfor quick access to servers - A function
sshprojectto SSH and directly cd into the project - Auto-completion of the shortcuts
As you can see, adding extra utilities through a plugin is straightforward zsh scripting!
The power comes from having it tightly integrated and instantly accessible rather than depending on external scripts.
Anatomy of a Plugin
All custom plugins reside in ~/.oh-my-zsh/custom/plugins/.
The naming format is simple:
<plugin_name>.plugin.zsh
For example:
ssh.plugin.zsh
handytools.plugin.zsh
The key things available to your plugin code are:
Aliases
Handy shortcuts for commonly used tools / commands
Functions
Reusable logic for automating workflows
Completions
Smart autocompletion for custom functions / scripts
Custom prompts
Fancy prompts displaying dynamic system / context info
Theming
Customizing the style and colors of prompt + UI
And more via normal zsh scripting constructs.
Share Plugin Goodness
Once you have created your neat custom plugins (maybe after some refinement and battle testing), consider open sourcing them on GitHub to share with the community!
Describing functionality clearly and providing usage examples in the README pays rich dividends in the form of other developers finding and benefiting from your work.
Pick a Beautiful Theme
What good is an enhanced workflow if it still looks bland?
Dress up your shell by picking one of hundreds of gorgeous themes available.
While the Robby Russell theme ships as the default, more contemporary options like Powerlevel10k and Spaceship are quite popular.
Powerlevel10k provides a huge canvas allowing you to customize exactly which system stats and context info to show dynamically. You can see disk space, jobs count, return status and tons more all inline without running extra commands. Everything color coded leading to nice visual clarity between components.
Spaceship on the other hand focuses more on a clean minimalist look with support for adding git branch details. This aligns better if you value aesthetics more over dense real estate.
There are no right or wrong choices here – browse the full themes list and pick what catches your eye!

Fig 2: A sampler of popular Zsh themes
Don‘t just stop at the themes though. Sprinkle in color through environment variables like this:
export LSCOLORS="ow=01;36;40" && export LS_COLORS="$LSCOLORS"
The above sets distinct colors for directories and files when listing contents.
Tweak around with different combos to arrive at the colors that please you most!
Additional Tips for Customization
We‘ve covered the bulk of functionality provided through Oh My Zsh plugins and themes already. But a few more customization goodies deserve mention as well since they can level up workflow even further:
Fancy Autosuggestions
As you start typing commands, showing a suggestion for the most likely continuation saves keystrokes. The zsh-autosuggestions plugin provides this capability and seamlessly integrates with history.
Give it a whirl for an almost magical feel!
Fish-like Syntax Highlighting
While Zsh doesn‘t have inbuilt syntax highlighting like Fish, you can replicate the functionality quite easily via zsh-syntax-highlighting.
This highlights commands, aliases and paths in different colors as you type for excellent visual aid.
Enhanced Directory Navigation
The enhancd plugin turbocharges directory changes by enabling commands like:
cd /u/lo/b
Instead of having to type the full /usr/local/bin path.
It learns your move movements patterns and handles fuzzy matches like a breeze!
And Much More
Dig through awesome-zsh-plugins for even more gems to enhance your workflow exactly as desired.
The sky is truly the limit when it comes to customization thanks to the zsh community‘s amazing plugins.
Putting it All Together
We have covered a LOT of ground here in unleashing zsh‘s potential – from basics of getting started to custom plugins and tweaked themes.
Let‘s do a quick recap:
- Zsh solves many shell annoyances with smarter autocompletion, better corrections and themes support
- Framework like Oh My Zsh adds 1000x more functionality easily
- Plugins extend it EVEN further with time-saving aliases / tools integration
- Writing custom plugins lets you add secret sauces specific to your flow
- Theming makes your interface pretty and personalized
Combining all these superpowers according to your unique needs and usage patterns enables next-level shell productivity not achievable otherwise.
The great thing about all we discussed today is that there are no downsides – you only stand to gain enhancements and time savings from switching over.
To conclude, I highly recommend bookmarking handy resources like:
- Awesome Zsh Plugins – Discovery engine for plugins & tools
- Zsh Community Forums – Discussions & insights
- Built-in Zsh Completion System – Official completion syntax guide
Armed with the fundamentals covered today and amazing resources for exploration, you are now well equipped take your shell game to kickass new heights!
I wish you happy times tinkering further and tuning your zsh setup to unlock maximum productivity. Do drop your custom plugin creations and theme ideas below!


