How to Make Your Terminal Looks Better in 15min

Installing Zsh + Oh My Zsh + Powerlevel10K

Rasika Perera
3 min readAug 28, 2021
Photo by Cash Macanaya on Unsplash

The title of this article could also be: Why you should consider using Oh My Zsh over Bash.

As Developers, we spend lots of time in Terminal than we think⏳. Bash has become the de-facto terminal shell ever-since it’s the factory-fitted shell in most OSs 🙇.

But, have you ever been tired of using “CTRL+R” for reverse search in bash? 😫 Or running “git status” for the thousand-times to see the current git-branch? 😢 Or typing “cd” every freaking time to switch? What about auto-completion to be at the next level?

📢 This is WHY you should consider Trying ‘Oh My Zsh’ and P10K!

There’s a whole bunch of surprises bundled with it…🪄

  • Better auto-complete: Auto completion with [TAB] key is much-much better than bash.
  • Automatic `cd`: No need to type cd to switch into directories.
  • Take command: You can create a directory and switch into that with take test , saving you running mkdir test; cd test
  • Search through history: When you are middle of a command, pressing up-arrow ⬆️ will provide you with the previous commands from the history. up-up, will give the next result.
  • Current git branch and status: p10k provides the current git branch and other git status information out of the box.

This is how it is going to be…😎

Photo By Powerlevel10K

Before We Start…

If you are using Mac OSX, I recommend you to first install iTerm2, But for the Ubuntu users they can continue the steps with their default GNOME Terminal.

1. Install Z Shell

First, we need to install Z Shell. Oh! wait, It is pronounced as zee-shell 😜. But you can call it zed-shell 🇬🇧 as well. Zsh is an alternative to Bash shell which implements a lot of nice features to boost your productivity.

Open-up your Terminal and run below;

sudo apt-get install zsh

2. Install Oh My Zsh

Oh My Zsh on top of Zsh provides a nice opensource framework for managing zsh cool features and themes.

Run below to install the latest Oh My Zsh;

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

3. Install and Set Powerlevel10K

Powerlevel10K is a theme for Zsh with speed, flexibility and out-of-box experience.

Run below to install P10K;

git clone — depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Now open ~/.zshrc and change the following parameter value.

ZSH_THEME="powerlevel10k/powerlevel10k"

4. Restart the PC Now!

Restart the PC to make the Zsh and other plugins take effect.

5. Download and Install Meslo Font

Download and Install Meslo Nerd Font from this repository. This font already includes many glyphs (icons) including Font-Awesome, Devicons, and Octicons.

6. Configure Terminal for Meslo Font

If you are using the default GNOME Terminal;

Open Terminal → Preferences and click on the selected profile under Profiles. Check Custom font under Text Appearance and select MesloLGS NF Regular.

For Other Terminals, please refer here.

7. Configure Powerlevel10K

Run p10k configure in terminal, and configure Powerlevel10K as per your taste.

Photo By Powerlevel10K

That’s It, Enjoy !

Thanks for reading. If you enjoyed this article, feel free to hit that clap button 👏 to help others find it.

--

--

Rasika Perera

Lead Software Developer @H2O.ai Ex-WSO2, Open-source Contributor, Blogger