終端神器ZSH

ps:為何使用zsh而不適用默認(rèn)的bash?
1、忽略大小寫;
2、高亮顯示;
3、簡單易用;

一、自動(dòng)安裝命令(1-2如果已經(jīng)有該服務(wù),請直接執(zhí)行3)

**1. brew安裝: **

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

2. wget安裝:

brew install wget

3. 如果安裝了wget,自動(dòng)安裝zsh:

wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh
二、手動(dòng)安裝ZSH

1. 克隆倉庫

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

2. 如果你已存在/.zshrc文件,則備份現(xiàn)有的/.zshrc文件(可跳過)

cp ~/.zshrc ~/.zshrc.orig

3. 創(chuàng)建一個(gè)新的zsh配置文件(可跳過)*

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

4. 改變默認(rèn)的Shell*

chsh -s /bin/zsh

5. 重新啟動(dòng)你的終端(Terminal)

Paste_Image.png

**6.如果你的默認(rèn)shell是bash ,那么把. ~/.bash_profile追加到 ~/.bashrc 末尾, bash開啟時(shí)會(huì)自動(dòng)執(zhí)行.bashrc這個(gè)文件。
如果沒有~/.zshrc,使用touch ~/.zshrc創(chuàng)建(將source /.bash_profile內(nèi)容復(fù)制到/zshrc中)。
如果是其他的 比如 zsh, 那么追加到 ~/.zshrc 末尾

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容