Linux 安装zsh

添加第三方源

1
2
3
4
sudo yum install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

安装zsh

如果你用 Redhat Linux,执行:

1
sudo yum install -y zsh

如果你用 Ubuntu Linux,执行:

1
sudo apt-get install zsh

安装oh my zsh

自动安装:

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

手动安装:

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

更改默认shell

1
chsh -s /bin/zsh

安装插件

1
2
3
4
5
6
7
git clone git://github.com/joelthelion/autojump.git
cd autojump
./install.py
yum install autojump-zsh -y
vi ~/.zshrc
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh
plugins=(git autojump )