一、安装zsh
①:查看当前shell使用版本
[root@localhost ~]# echo $SHELL/bin/bash
②:安装zsh
yum install -y zsh
[root@localhost ~]# yum install -y zsh已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com正在解决依赖关系--> 正在检查事务---> 软件包 zsh.x86_64.0.5.0.2-34.el7_8.2 将被 安装--> 解决依赖关系完成
返回结果如下,表示切换完成。配置完成后需要重启方能生效!
③:设置zsh为shell默认版本
请在root用户下切换shell
chsh -s /bin/zsh
[root@localhost ~]# chsh -s /bin/zshChanging shell for root.Shell changed.[root@localhost ~]#
二、安装git
- 自动和手动安装都需要安装
gityum install -y git
[root@localhost ~]# yum install -y zsh已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com正在解决依赖关系--> 正在检查事务---> 软件包 zsh.x86_64.0.5.0.2-34.el7_8.2 将被 安装--> 解决依赖关系完成
三、安装oh-my-zsh
使用以下命令,自动安装
oh-my-zshsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
出现以下界面,显示安装成功 ```shell Looking for an existing zsh config… Using the Oh My Zsh template file and adding it to ~/.zshrc.
Time to change your default shell to zsh: Do you want to change your default shell to zsh? [Y/n] y Changing the shell… Changing shell for root. chsh: Shell not changed. Shell successfully changed to ‘/bin/zsh’.
__ __
/ /_ _ __ _/ /
/ \/ \ / ` \/ / / / / / / _/ \
/ // / / / / / / / / / / // / / /( ) / / /
__// // // // //_, / /__/// //
// ….is now installed!
Before you scream Oh My Zsh! look over the .zshrc file to select plugins, themes, and options.
• Follow us on Twitter: https://twitter.com/ohmyzsh • Join our Discord community: https://discord.gg/ohmyzsh • Get stickers, t-shirts, coffee mugs and more: https://shop.planetargon.com/collections/oh-my-zsh
---<a name="t8lNq"></a>## 四、修改主题- 找到`.zshrc`的配置文件```bash[root@localhost ~]# ll /root/.zshrc-rw-r--r--. 1 root root 3.8K 11月 24 15:55 /root/.zshrc
- 在配置文件中修改主题 ```bash 默认主题为: ZSH_THEME=”robbyrussell”
修改主题为: ZSH_THEME=”agnoster” ```
- 完成后,重启生效默认
shell

五、修改XShell配色主题
- 修改
xshell的配色方案为:Obsidian的方案类型:


