1. 安装zsh
本教程的为Ubuntu下操作。
1 2 3 4 5 6 7 8 9 10 11
| sudo apt install zsh
echo $SHELL
chsh
chsh -s /bin/zsh
|
2 . 安装oh-my-zsh
1 2 3 4 5
| sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"****
|
如果使用官方的github源,速度可能有点慢。因此可以使用改造过的gitee源,若失效,百度即可。
3. 相关文件
- 配置文件位置位于
~/.zshrc
- oh-my-zsh 的数据文件位于
~/.oh-my-zsh 文件夹下
当需要修改主题或者插件时,可以直接在配置文件中进行修改。需要下载新的插件和主题时,需要放入 .oh-my-zsh文件夹中的相应位置。
4. 安装插件
1 2 3 4 5 6 7 8 9 10 11
| plugins=( zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search z extract git)
z、extract、sudo、git
|
推荐下载插件:
1 2 3 4 5 6 7 8
| git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
|
5. 修改主题
6. 其他