Mac最好用的終端iTerm2安裝及配置


用HomeBrew cask安裝iTerm2    

brew cask install iterm2

將zsh設為默認shell

chsh -s /bin/zsh

手動安裝oh-my-zsh

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

git clone太慢的解決辦法

 

配置主題:

 

zsh的配置都在~/.zshrc下,命令用Sublime Text打開,進行編輯

open ~/.zshrc -a /Applications/Sublime\ Text.app

我使用agnoster主題,推薦。關於zsh的主題列表,請看這里

修改配置文件

ZSH_THEME="agnoster"

因為缺失主題所用到的字體,使用主題命令行會有亂碼;

下載powerline字體

# clone
git clone https://github.com/powerline/fonts.git
# install
cd fonts
./install.sh

然后在iterm2 Preference設置如下:

 

 

 

搞定!效果圖如下

 

 

 

 

參考的文章:

https://segmentfault.com/a/1190000005013881

https://zhuanlan.zhihu.com/p/26373052

https://www.cnblogs.com/shengulong/p/10176374.html

 

如果安裝過程中有問題可以在評論區留言。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM