Work wants to be good at its work

Time:2019-10-21

A good terminal will make people feel happy. No matter in visual effect or function convenience, you can use it safely and comfortably. The more you use it, the better it will be. You can’t stop. Well, there is no more nonsense. The first step of a good terminal is to install various software packages.

One, software package

Oh My Zsh

Oh my Zsh is an evolution version of bash, which provides colorful interface display and intelligent prompt.
installOh My Zsh

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

Give WayOh My ZshAs defaultshell

$ chsh -s /bin/zsh

After installation, re-enter the terminal.

<!–more–>

Homebrew

As we all know, this is a package manager. There are many useful software in it. You only need to install it with one click. Use the command below to complete the installation. You can also refer to the official website for more information.

installbrew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Usebrew

$ brew install xxxx

Homebrew Cask

Homebrew CaskyesbrewAn extension tool of is mainly used to install software and tools with graphical interface. If you are interested, you can go to its official website.

installbrew cask

$ brew tap caskroom/cask

Usebrew cask

$ brew cask install google-chrome

Git

Open source projects are maintained ingitAnd some of the company’s code is also placed ingitOn the server, this tool is naturally needed.

$ brew install git

Node

It’s not just nodev8Engine andeven loopHigh concurrencyIOServers, andnpm, a powerfuljsDependency package manager for.

$ brew install node

BecausenodeMost of the packets are put on servers abroad, which are often very slow, and most of the time they are waiting painfully. So we can use an image server, which will greatly improve the download speed. Here we usually use Taobao’s image.

adoptnpminstallcnpm, so that we cancnpm installTo install the package.

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

Next you need to installnvmIt’s for managementnodeVersion, you can switch between multiple versions at will. aboutnvmYou’ll know how to use it.

$ brew install nvm

Sdkman

As the name implies, this tool is used to installsdkThe software development kit manager.

installsdkman

$ curl -s "https://get.sdkman.io" | bash

installsdkman

$ curl -s "https://get.sdkman.io" | bash

Java

One button installationjava sdkIt’s very convenient.

$ sdk install java

II. New terminal iterm2

Introduction and installation

Iterm2 is a powerful terminal tool forTerminalIt has many practical functions. And integratedtmux, really usevimemacsGood news for developers. It can be downloaded and installed directly on the official website.

Theme color matching

InstallationiTerm2You will find that the interface color of the terminal is very good.low, not pleasing to the eye at all, so I started to find the right theme color in iterm2 color schemes, and then found that there was aToychestThe color value of the theme looks good, so it’s decided to be it.

First fromgithubLast cloneiTerm2-Color-Schemes

$ git clone https://github.com/mbadolato/iTerm2-Color-Schemes

Then openPreferences - > profile - > ColorFindcolor presetsInsideimportYou can chooseToychestImported. After the import is successful, you need to manually select it to take effect.

Work wants to be good at its work

File type color

For utilitygnuYou need to installcoreutils, it is agnu linuxCommand set.

To install coreutils from homebrew:

$ brew install xz coreutils

After the installation is successful, you need to exportdircolors

$ gdircolors --print-database > ~/.dircolors

stay.zshrcIn profile, configuredircolors

PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"


alias ls='ls --show-control-chars --color=auto'
eval `gdircolors -b $HOME/.dircolors`

alias grep='grep --color'
alias egrep='egrep --color'
alias fgrep='fgrep --color'

Finally load the new configuration:

$ source ~/.zshrc

Attach the overall rendering:

Work wants to be good at its work

Summary

OK, our terminal has been basically configured. If new software packages are added in the future, they are basically focused onbrewandsdkTo install, for example:gradlemavenmysqlmongodbAnd so on. At this point, a favorite terminal of its own is ready to roll up and start rolling up the code happily.

Reference resources

  • Mweb unified Publishing