Leif160519的blog Leif160519的blog

——————

目录
centos7安装zsh配置oh-my-zsh
/    

centos7安装zsh配置oh-my-zsh

1.安装zsh

yum -y install zsh

2.切换默认shell为zsh

chsh -s /bin/zsh

注意:有的教程会让在这一步重启机器,我们可以先暂不重启,等最后一步执行完毕后重启即可。

3.安装on my zsh

curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

实际上到这一步oh my zsh就已经安装完成了,这时重启即可永久生效

4.修改oh my zsh 主题

查看oh my zsh主题

ls ~/.oh-my-zsh/themes

显示如下

adben.zsh-theme          gallois.zsh-theme          nicoulaj.zsh-theme
af-magic.zsh-theme       garyblessington.zsh-theme  norm.zsh-theme
afowler.zsh-theme        gentoo.zsh-theme           obraun.zsh-theme
agnoster.zsh-theme       geoffgarside.zsh-theme     peepcode.zsh-theme
alanpeabody.zsh-theme    gianu.zsh-theme            philips.zsh-theme
amuse.zsh-theme          gnzh.zsh-theme             pmcgee.zsh-theme
apple.zsh-theme          gozilla.zsh-theme          pure.zsh-theme
arrow.zsh-theme          half-life.zsh-theme        pygmalion.zsh-theme

修改主题

vim ~/.zshrc

可以看到默认的主题是ZSH_THEME="robbyrussell"改成自己喜欢的即可

其他关于oh-my-zsh的详细用法可以查看官方文档


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题centos7安装zsh配置oh-my-zsh
作  者Leif160519
出  处https://github.icu/articles/2019/11/17/1573966255174.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!