A mounting base assembly
First execute
yum
commands required to install thezsh
original program withgit
programpull
code.yum install -y zsh git
Installation
oh my zsh
script (this step needs to be installedgit
).wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
Use
which zsh
to viewzsh
the installation directory, usually stored in the/usr/bin/zsh
directory.which zsh
Use the
chsh
command to switch the shell program uses.chsh -s /usr/bin/zsh
Second, be optional
2.1 Installation ZSH icon fonts
Execute the following command in the current directory pulling icon warehouses, and switch to its directory, execute ./install.sh
scripts to install successfully.
git clone https://github.com/powerline/fonts.git
2.2 replacement ZSH theme
Use vi
tools to edit /root/.zshrc
the file, change the ZSH_THEME="robbyussell"
field to ZSH_THEME="agnoster"
field, and by source ~/.zshrc
the command update their profiles.
2.3 Plug
The reason for using ZSH replace the original SHELL most important thing is to use its powerful plug-ins, where only recommended to install three plug-ins, they are wd
, zsh-syntax-highlighting
, zsh-autosuggestions
.
First, in turn execute the following command, the latter two cloned into the plug-warehouse at Oh My Zsh plugins directory.
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions.git
After completion of the cloning operation, then the full path are two plug-ins:
/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zsh
/root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
Continue to use vi
editing ~/.zshrc
files.
# 其他内容
plugins=(
git
wd
zsh-syntax-highlighting
zsh-autosuggestions
)
source /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-syntax-highlighting.zsh
source /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH/oh-my-zsh.sh
# 其他内容
After editing is completed, the execution source ~/.zshrc
command to update ZSH configuration, the final effect as in FIG.