mac zsh oh-my-zsh

安装zhh教程Installing ZSH · ohmyzsh/ohmyzsh Wiki (github.com)

 

使用brew安装zsh

>brew install zsh zsh-completions

安装前最好搜索下

>brew search zsh

 

查询zsh是否安装成功to check out the version

>zsh --version

如成功,则会显示其版本号,本机zsh版本号5.8

 

查询zsh安装路径(由于本机是brew安装的,在这个目录下)

>echo $SHELL

to check out the install path

I just install zsh with brew,so the path is:/usr/local/bin/zsh-5.8

也许你的安装路径为

/usr/local/bin/zsh 

或者

/bin/zsh

who knows

 

将brew安装路径添加到系统shells中

>sudo vi /etc/shells

add line as:

/usr/local/bin/zsh-5.8

then change shell with zsh:

>chsh -s /usr/local/bin/zsh-5.8

如果不添加shells中的话会出现以下错误提示 else you will fine error hint like :

关键词为non-standard shell

solution:

macos - How to change the Login Shell on Mac OS X from bash to zsh? - Super User

 

next is how to install oh-my-zsh

first you should install the Powerline Fonts in order to render the themes properly

powerline/fonts: Patched fonts for Powerline users. (github.com)

quick installation:

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

uninstall:

Run ./uninstall.sh to uninstall all Powerline Fonts. You can also copy the quick installation commands changing only the line ./install.sh to ./uninstall.sh.

 

第二是安装oh-my-zsh

由于是网络的问题,无论是curl还是其他的方法都不行,只能使用manual方法

其实curl等方法无非就是将Install.sh执行里面的代码,所以直接git clone oh-my-zsh这个仓库

如果不要的话就直接删除了

>rm -rf ~/.oh-my-zsh

然后创建一个.zshrc文件,重新启动shell即可

 

posted on   风中狂笑  阅读(222)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示