mac电脑安装Zsh并启用

阅读 61

2024-08-19

安装 Zsh

1. 安装 Zsh

新版mac系统会默认安装并使用zsh,如没用,需在终端中安装:

brew install zsh

2. 安装 Oh My Zsh

克隆Oh My Zsh到你的目录:

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

3. 复制 .zshrc 配置文件

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

4. 更改默认 Shell

chsh -s /bin/zsh

5. 设置别名

.zshrc中添加别名:

alias ll='ls -l'

6. 应用配置

每次修改.zshrc后,使更改生效:

source ~/.zshrc

精彩评论(0)

0 0 举报