Linux CentOS安裝zsh、oh-my-zsh和autojump__Linux

來源:互聯網
上載者:User

zsh牛逼之處參見:https://www.zhihu.com/question/21418449

安裝zsh

yum install -y zsh

裝完之後驗證一下最後一行有/bin/zsh

[root@hadoop3 ~]# cat /etc/shells/bin/sh/bin/bash/sbin/nologin/usr/bin/sh/usr/bin/bash/usr/sbin/nologin/bin/zsh

切換shell為zsh

chsh -s /bin/zsh

然後echo $SHELL看還是bash,很多部落格說要重啟,其實只要退出終端重新開啟就切換過來了。

安裝oh-my-zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

有時候連不上github的443連接埠,就直接下載

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

再重進登入一下終端就可以用了

查看主題

ls .oh-my-zsh/themes

把.zshrc裡面的theme改成ys,提示符變成這樣:

# root @ hadoop3 in ~ [10:59:27]

安裝自動提示外掛程式

wget http://mimosa-pudica.net/src/incr-0.2.zshmkdir ~/.oh-my-zsh/plugins/incrmv incr-0.2.zsh ~/.oh-my-zsh/plugins/increcho 'source ~/.oh-my-zsh/plugins/incr/incr*.zsh' >> ~/.zshrcsource ~/.zshrc

ok了,cd一下看看爽不爽。

安裝autojump

我yum源沒有autojump,直接下載安裝

git clone git://github.com/joelthelion/autojump.gitautojump/install.py

安裝完成在~/下面有.autojump目錄,在.zshrc裡面加一行

[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh

妥了,可以使用j了。
我敲過一遍cd ~/go/src/learningGo/ch2以後如果換了目前的目錄,再敲j 2就回來了,爽。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.