1. 切换shell
切换为bash
chsh -s /bin/bash
切换为zsh
chsh -s /bin/zsh
查看本机安装了哪些shell
cat /etc/shells
查看当前使用shell
echo $0
2. 环境变量配置
- 配置bash_profile (bash环境变量)
vim ~/.bash_profile
- 刷新
source ~/.bash_profile
- 配置.zshrc(zsh环境变量,导入bash) 添加
source ~/.bash_profile
切换为bash chsh -s /bin/bash
切换为zsh chsh -s /bin/zsh
查看本机安装了哪些shell cat /etc/shells
查看当前使用shell echo $0
vim ~/.bash_profile
source ~/.bash_profile
source ~/.bash_profile