赞
踩
网上的教程已经很多了,但是很多还是不够详细,我这里总结了一个全面的教程。
用下面这个命令即可查看(M1默认使用的是 zsh):
echo $SHELL
iTerms2 下载地址点击这里:https://iterm2.com/
iterm2的设置里选择 profiles
--> colors
中选择 Solarized Dark
Oh My Zsh是一个开源的、社区驱动的框架,用于管理您的Zsh配置.
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
这种方式一般会因为 github登陆失败(443)而无法安装,因此推荐采用下面的方式安装:
git clone https://gitee.com/mirrors/oh-my-zsh ~/.oh-my-zsh
.oh-my-zsh
文件里的的 zshrc.zsh-template
文件复制成 zshrc 文件:cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
打开 zshrc
文件后将 ZSH_THEME="robbyrussell"修改为ZSH_THEME="agnoster"
vim ~/.zshrc
zshrc
文件,刷新配置文件即可:zsh ~/.zshrc
//clone 克隆
git clone [https://github.com/powerline/fonts.git](https://github.com/powerline/fonts.git)
// install 安装
cd fonts
./install.sh
Profile
中的 Text
选项卡中里的、 Font 和 Non-ASCII Font的字体都设置成 Powerline的字体,我这里设置的字体是 Meslo LG S DZ for Powerline
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
vim ~/.zshrc
# 在文件里找到plugins,修改为
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
zsh ~/.zshrc
至此,Mac M1 安装 iTerm2+Oh My Zsh+zsh-syntax-highlighting 已经完成,我是第一次使用mac电脑,再折腾的过程中我是越来越喜欢了,真香!
如果这篇文章对你有帮助,欢迎关注我,之后我也会分享更多 M1 Mac 相关的教程,感谢阅读。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。