Setup your terminal like a pro with iterm and zsh

Shiva Pandey
Oct 8, 2020 · 3 min read
Image for post
Image for post
Terminal of Shiva Pandey

Programing requires you to frequently use the terminal to perform many actions. The default terminal is just plain ordinary and doesn’t help you at all with limited information and blant design. Zsh also known as Z Shell is a shell built on top of the default shell for macOS(bash).

Zsh has huge number of features and when combined with iterm it becomes a beast for programming and productivity. Let’s take a look at how we can setup our terminal that gives us the information we need and helps us with the productivity all packed in a attractive appearance.

1. Homebrew

If you are already working with terminal for some time and been into programming, you most likely have Homebrew installed. Otherwise you can go ahead and install homebrew using the command below.

2. iTerm2

Iterm contains much better features compared to the default terminal in macOS and most programmers prefer using it. The latest version of iterm is iTerm2. Install the iTerm2 using the command:

3. Zsh

MacOS ships with zsh by default and you don’t need to do anything. But if your system doesn’t have the zsh configuration, we will need to install it for the next steps to follow.

Run this command to install zsh.

4. Oh My Zsh

Oh My Zsh is a framework for managing your zsh configuration. It allows you to configure zsh easily. Install Oh My Zsh using this command:

Now, restart your terminal and you are good to go.

5. Theme

Oh My Zsh by default comes with lots of themes (default being: robbyrussell). You can change between prebuilt theme. But to built a powerful and beautiful looking terminal you will need to use a custom theme. One of the most popular custom theme for zsh is powerlevel9k. Let’s clone the repository:

Once the themes are cloned, go ahead and update your zsh configuration to change the theme to powerlevel9k.

Open the zsh configuration using the command:

Once the file is open, replace the existing theme with powerlevel9k, by editing this line:

Save the file and update your changes by running this command:

To change the colors and appearance, you can navigate to Preferences > Profiles > Colors and play around with colors or you can use pre-built color scheme. Go ahead and download the zip file of Color Schemes. Extract the zip file.

For the next step, go to the colors inside profiles from preferences and import the color schemes by clicking on Color Presets.

6. Fonts

Next steps is installing fonts. Download a preferred font from powerline fonts and install it. Change the font from preferences menu to the font you just downloaded. If your font supports ligatures, check the “Use ligatures” option to enable ligature in your terminal. Ligatures are really cool features of fonts, Fira code is an open source font that supports ligatures.

7. Customizing prompt

By the time you finish this setup. You will have prompts appearing on both sides of the terminal. Some people like the information provided and how it looks. I am particularly not a fan of these. So, if you would like to customize how the prompts look.

Open your zsh configuration:

After the theme option. Add following lines:

I am just customizing the left prompt for what I like. You can look the features that you can change here. Once you are done with this, save the file and update the changes by running the command:

Now you should have a beautiful terminal that you will love.
Congratulations!!

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Sign up for Best Stories

By Dev Genius

The best stories sent monthly to your email. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Shiva Pandey

Written by

Full Stack Developer at Facebook and Tech Enthusiast. Read my personal blog at: https://shivapandey.com/ Follow me on twitter: https://twitter.com/shivapandey04

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Shiva Pandey

Written by

Full Stack Developer at Facebook and Tech Enthusiast. Read my personal blog at: https://shivapandey.com/ Follow me on twitter: https://twitter.com/shivapandey04

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store