Home Make Bash Terminal Prettier
Post
Cancel

Make Bash Terminal Prettier

The default bash terminal that comes with Mac system is Terminal. It is okay to use it. However, if you spend a lot of time in a terminal, I highly recommend you make your terminal prettier by just some simple steps. Here is what my terminal looks like:

terminal screenshot

If you want to set up your terminal like this, let’s go!

First Step: Install iTerm2

iTerm2 is a replacement for Terminal and the successor to iTerm. It provides much more powerful features than default Terminal.

You can install it either by Homebrew:

1
brew install --cask iterm2

Or by Download and install iTerm2

After it is installed, you can configure color theme through iTerm2 -> Preferences -> Profiles -> Colors -> Color Presets…. Solarized Dark is what I use

Second Step: Install Oh My Zsh

Oh My Zsh is an open source framework for managing your zsh configurationn which is available in GitHub.

You can install it with curl

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

When installation is done, update ~/.zshrc file and set ZSH_THEME="agnoster" for the default look. But we will update theme later.

Third Step: Install Powerlevel10k

You can run the following command to install it:

1
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Then edit your ~/.zshrc and set ZSH_THEME="powerlevel10k/powerlevel10k". Once you complete, you need to shut down current terminal session and restart. When new terminal session is triggered, the Powerlevel10 configure wizard will be launched. You will see a bunch of configuration options. I put my choices here for your reference, so you can have an exact look of mine

  1. Does this look like a diamond (rotated square)? (y) Yes
  2. Does this look like a lock? (y) Yes
  3. Does this look like a Debian logo (swirl/spiral)? (y) Yes
  4. Do all these icons fit between the crosses? (y) Yes
  5. Prompt Style (3) Rainbow
  6. Character Set (1) Unicode
  7. Show current time? (2) 24-hour format.
  8. Prompt Separators (1) Angled
  9. Prompt Heads (1) Sharp
  10. Prompt Tails (1) Flat
  11. Prompt Height (1) One line
  12. Prompt Spacing (2) Sparse
  13. Icons (2) Many icons
  14. Prompt Flow (1) Concise
  15. Enable Transient Prompt? (n) No
  16. Instant Prompt Mode (1) Verbose (recommended)
  17. Overwrite ~/.p10k.zsh? (y) Yes

If you want to update your configurations later, you can trigger the wizard by run p10k configure

Congratulation, You are all set!

This post is licensed under CC BY 4.0 by the author.

Why Cloud?

Design Pattern - Singleton

Comments powered by Disqus.