一、安装命令:
$?git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
或:
sh -c"$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
或:
sh -c"$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
二、创建zsh配置文件(注意:如果已有,先做备份):
备份命令:
$ cp ~/.zshrc ~/.zshrc.orig
创建命令:
$ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
切换命令:
$ chsh -s /bin/zsh
三、卸载oh-my-zsh:
命令:
$ uninstall_oh_my_zsh
四、更新oh-my-zsh:
命令:
$?upgrade_oh_my_zsh
五、更换主题:(编辑.zshrc文件)
命令:
$ vim ~/.zshrc
修改字段:
ZSH_THEME="ys" ? ? ? ? ? ? ? ? ? ? ? ? ? ?// 修改主题
DISABLE_AUTO_UPDATE="true" ? ?// 是否自动更新
六、相关配置:(编辑.zshrc文件)
在.zshrc文件最后添加:
source ~/.bash_profile
保存退出后,执行以下命令:
$ source ~/.zshrc