Mac OS Terminal Landscaping: Iterm2 + zsh + oh~my~zsh Setup Tutorial

Source: Internet
Author: User
Tags git clone


Mac comes with the terminal terminal does not have the file name highlighting and so on, and the interface is not very good-looking, so tonight learning roommate toss the terminal, you can make their use more convenient, looks more comfortable.

Let's just say the configuration method. The introduction of these three nouns can be seen at the end of the text.

Configuration Method 1. Download and install Iterm2

Official website:

Open the official website to download the installation package, open the installation just fine.

2. Switch Shell to Zsh


To see if the switch was successful



3. Installing Oh~my~zsh
Sh-c "$ (curl-fssl"

4. Install additional font libraries (some themes will use some other fonts)

Powerline Font:

The installation steps are as follows (from their GitHub):

# Clonegit Clone installcd fonts./ clean-up a BITCD. RM-RF fonts

After installation, select a powerline font: Change font (I use Meslo LG), font-----Preferences, Profiles,


5. Modify the theme configuration by modifying the. zshrc file in the home directory.
Zsh_theme= "Agnoster"

This can set the terminal theme. This agnoster theme is cool, you can have a try.

Each time you modify the theme configuration, you need to restart the terminal terminal.

Other topics can refer to Oh My zsh theme Sites

Default_user= $USER

This is a special love! Add this configuration to remove the [email protected] in front of each line of the shell.

6. Command highlighting (optional)

This plugin can let ls/vim such as command Korea display. As follows:

Zsh-syntax-highlighting Address:

The installation steps are as follows (from their GitHub):

git clone echo "source ${(q) pwd}/zsh-syntax-highlighting/ Zsh-syntax-highlighting.zsh ">> ${zdotdir:-$HOME}/.ZSHRC

Restart the terminal to start the highlight effect.

This blog address:


Software Introduction

The following content is from:

Thank you very much for the original author.

About ITERM2

ITerm2 is a completely free command-line app for Mac OS users, and, of course, a favorite for the program's members. ITerm2 itself supports many custom settings, such as custom color matching, custom shortcuts, convenient horizontal and vertical split-screen functions, etc... It is not taboo to say that it is now the best terminal tools under the Mac is not too. Of course, in daily work and development, it is the choice to replace the terminal of Mac. About Zsh and Oh My Zsh
With the terminal sharp ITerm2, of course, also need to be equipped with a handy shell. As we all know, the most widely used default shell today is bash because it is also the default shell for many Linux distributions. As the default comes with the shell, its characteristics, that is: not very obvious-_-# is not very convenient place is: the customization and scalability is limited, auto-complete function is not strong enough ... So, with the ITERM2, you need a more powerful shell to match.

About Shell

The first recommendation is zsh. The reason is called zsh, the meaning is:

The last shell of you ' ll ever need!

It can be understood that once it is used, there is nothing to ask for. Zsh is much more powerful than bash, and can automatically fill commands, parameters, filenames, processes, usernames, variables, permissions, and more ... In addition, plug-ins are supported, and many functions can be extended by plugins.

Since there is zsh, that Oh My zsh is what?

Because Zsh's default configuration is extremely complex and cumbersome, it's daunting, until you have the Open source project Oh My zsh, so that the zsh configuration drops to 0 threshold. And it's completely compatible with bash. So, we can understand that Oh My zsh is an open source tool that facilitates your configuration and use of zsh.

This blog address:

Mac OS Terminal Landscaping: Iterm2 + zsh + oh~my~zsh Setup Tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.