Linux下安装zsh

目录
以官方文档为准
安装 oh-my-zsh 前的准备:
- A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL2 is preferred, but cygwin or msys also mostly work.
- Zsh should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run
zsh --version
to confirm), check the following wiki instructions here: Installing ZSH curl
orwget
should be installedgit
should be installed (recommended v2.4.11 or higher)
1.Ubuntu 安装 zsh
其他系统自行查看:Installing ZSH
|
|
2.安装 oh-my-zsh
github 地址:https://github.com/ohmyzsh/ohmyzsh
|
|

3.修改主题
使用vim
打开.zshrc
配置文件
|
|
修改主题为ZSH_THEME="ys"

退出zsh
,重新进入zsh
即可生效
4.安装插件
在~/.oh-my-zsh/plugins
中可以看到所有自带的插件,将插件名称添加到.zshrc
中plugin
字段中.
例如:
|
|
安装第三方插件
以安装zsh-autosuggestions
举例,插件地址在:https://github.com/zsh-users/zsh-autosuggestions
将该项目直接克隆到plugins
文件夹下
|
|
最后将插件名称添加到.zshrc
中plugin
字段中.
|
|
退出zsh
,重新进入zsh
即可生效
5.修改默认终端为 zsh
|
|
重启生效
6.root 用户使用同样的 zsh 配置
|
|
如果想两个用户配置不同步改变,可以使用下列命令
|
|
6.卸载 oh-my-zsh
|
|