安装 Homebrew&iterm2&Oh My Zsh


/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 将以上命令粘贴到终端:
 
 

 

下载安装.................

 

 

安装成功

 

 

用装好的 Homebrew安装iterm2

输入命令:brew cask instal iterm2 

查看系统的shell 

cat /etc/shells

 

回显:

/bin/bash

/bin/csh

/bin/ksh

/bin/sh

/bin/tcsh

/bin/zsh

(bash是mac中terminal自带的shell,把它换成zsh,这个的功能会增加)

 

更改默认shell:

chsh -s /bin/zsh

 

安装oh-my-zsh:

github 地址:https://github.com/robbyrussell/oh-my-zsh

两种安装方式(注意要先安装git,brew install git):

via curl

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

via wget

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

 

安装成功

 

下载字体,在喜欢的位置新建一个文件夹,转到新建的文件夹下

执行:

git clone https://github.com/powerline/fonts.git --depth=1

执行 ./install.sh

然后设置字体  :iTerm2 -> Preferences -> Profiles -> Text

 

 安装主题

git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.git

执行目录oh-my-zsh-agnoster-fcamblor下的 install文件:./install.sh

vim .zshrc

修改主题为 ZSH_THEME="agnoster"(设置agnoster主题必须更换为meslo字体,不然会出现乱码

 

可以更改个配色

 

退出重进iterm2风格如下:

 

可以安装oh-my-zsh的插件 

cd ~/.oh-my-zsh/custom/plugins/

git clone https://github.com/zsh-users/zsh-autosuggestions.git(选择自己想安装的插件地址,去https://github.com/zsh-users查看)

vim ~/.zshrc

修改里面的 plugins=(git)

例如

 

plugins=(

 

  git

 

  zsh-autosuggestions

 

  zsh-syntax-highlighting

 

)

source ~/.zshrc  搞定~

 

posted @ 2019-10-10 08:42  涂山倩倩  阅读(4547)  评论(0编辑  收藏  举报