macos bash zsh 切换 设置环境变量
1,macos bash zsh 切换 设置环境变量
- 查看shell
╰─➤ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
2,shell切换
- 切换到zsh
chsh -s /bin/zsh
- 切换到bash
chsh -s /bin/bash
3,zsh环境变量
vim .zshrc
4,查看当前shell
╰─➤ echo $SHELL
/bin/zsh
参考: