There was a time when the Mac was synonymous with efficiency and productivity. Especially for us programmers, Mac or Linux is standard, Windows? It doesn’t exist. 👽(unappetising to look at, even PowerShell I don’t like)

Especially the MacBook Pro, I love it! 😍

Here’s how to coach her with a new Mac:


Package Manager

Often when we buy a new computer, the next step is to install drivers, install software, patch… Busy as a lark. Don’t worry, Mac has a higher level of play oh!

Of course, the Mac can install software one by one manually, but don’t you think it’s too tiring? How do you break it? Answer: the Homebrew! Liverpoolfc.tv: brew. Sh/index_zh – cn

Using Homebrew to install Apple (or your Linux system) doesn’t come preloaded but you need something. Node.js, Chrome, etc

If you’re an Android developer, you know about Gradle and Maven. Yes,Homebrew is the most popular package management tool for MAC.

  1. Install Homebrew

Prerequisite: XCode installed

If Xcode is too bulky, you can download the Command Line Tools for Xcode from Apple's developer website.Copy the code

Install Homebrew

Run from the command line:
 $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copy the code

Depending on Git and Ruby, macOS comes with it

  1. Use the Homebrew management pack

Once installed, we can use it to manage our packages. Let’s take a look at the basic commands:

$ brew search wget  # Search software
$ brew info wget    # Check software information
$ brew install wget  # install wget
$ brew list wget    List the files after the software is installed
$ brew uninstall wget  # uninstall wget
Copy the code

You can view more commands and usage from the search engines or official website.

  1. Homebrew-Cask

It is a set of OS X software installation command line tools based on Homebrew, is an extension of Homebrew, generally with interface software can be installed through it

Access to Homebrew – Cask:

$ brew tap caskroom/cask
Copy the code

Basic use:

#Brew Cask and BREW commands are basically the same, search, info, list, install, uninstall subcommands are the same
$ brew cask install google-chrome  # installation
$ brew cask uninstall google-chrome  # uninstall
Copy the code

You can view more commands and usage from the search engines or official website.

  1. In the source

Due to reasons known to all, the domestic use is slow, can replace with tsinghua university source mirrors.tuna.tsinghua.edu.cn/help/homebr…

Click on the link above to see how to use it. Other sources can also be used, such as Chinese Academy of Sciences.

Command line Terminal

As a programmer, how can you do without a handy terminal tool? On Windows you’ve probably heard of cmder, but on MAC it’s iTerm2

  1. Install iTerm2
$ brew cask install iterm2
Copy the code

This theme is my own configuration, your default may not look like this, the following:

  1. Install the powerline
$ pip install powerline-status
Copy the code

Depending on Python, MAC comes with it.

  1. Install powerline fonts
$ git clone https://github.com/powerline/fonts.git --depth=1
# install
$ cd fonts
$ ./install.sh
# clean-up a bit
$ cd.
$ rm -rf fonts
Copy the code

Go to the iTerm2 Settings to modify the color and font, and select the color and font for Powerline.

The ultimate Shell: ZSH

The Shell is a Shell for Linux/Unix. It is responsible for the interaction between the outside world and the Linux kernel, receiving commands from users and other applications, translating those commands into a language that the kernel can understand, and passing those commands to the kernel, which does the real work and then returns the results to the user or application.

Are you still using bash by default on Mac? OTT!

What’s so powerful about ZSH? Such as command completion, such as automatic jump…… Too many. It supports many plugins to extend its functionality. Ok, pull out iTerm2:

Check out the shells your system currently supports:

$ cat /etc/shells
Copy the code
  1. Install the ZSH
$ brew install zsh zsh-completions
Copy the code
  1. Set ZSH as the default shell
$ chsh -s /bin/zsh
Copy the code
  1. Oh – my – ZSH installation

ZSH is powerful, but the configuration is complex. Oh-my-zsh is a configuration wrapper framework for the ZSH command line environment, simplifying the configuration and management of ZSH.

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Copy the code
  1. Install the ZSH theme
$ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k // I used powerleve19k, you can also choose other, appearance level is justice.Copy the code
  1. Install the ZSH plug-in
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/

$ git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/

$ brew install autojump1. Zsh-autosuggestions: Record real-time prompts according to historical input commands, which greatly improved efficiency. 2. A command highlighting plugin, where green indicates available commands and underlined paths indicate available paths. Jumping from a terminal folder is cumbersome and requires typing a long path. Autojump is implemented by recording the directory entered into the database, so it must be previously entered directory tojump.Copy the code

Don’t forget to configure open plug-ins and themes in ~/.zshrc

Then $source./ ZSHRC makes the configuration take effect.


At this point, the basic environment is set up, and then it’s time to install other tools and software based on your needs.

For example, installing Node, Python, Java, etc., it is worth noting that these development environments have environment management tools, through which to install, switch, upgrade the environment is easier.

NVM for Node, Conda for Python, Jenv for Java, etc

There are also some essential software VSCode, Chrome, etc.


Slash Youth: Indie developer/amateur trader/traditional culture enthusiast

More original in the public account: “Elegant programmer ah.” The whole stack. How programmers make money. Elegant technology, elegant money.

Pay attention to the public number, you can add my good friends exchange, also can add group technical exchange oh.