Mac学习--修改系统默认shell(这里改为zsh)
## 修改默认shell为zsh
1. 查看已经安装的shells
> cat /etc/shells
## 如果存在…/zsh
– 输出
例:
“`
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
“`
执行
> chsh -s /bin/zsh
==”/bin/zsh”这部分可能不一样,是你的电脑上zsh的安装路径==
重启 完成。
## 如果没有zsh
brew install zsh (需要brew, 没有的话去安装)
安装后,执行
> zsh –version
显示版本号代表成功
执行 chsh -s /bin/zsh(你电脑的zsh安装路径)
重启完成
### tips
– chsh -s 命令
> 改变当前shell设置为…
### 修改打开终端的默认shell
– 打开VSCode的设置(Preferences>User Settings)
– 搜索terminal.integrated.shell.osx 的 并把它的值改 为 你的zsh 安装路径
–
tip (cat /etc/shell 命令找到zsh路径)