相关文件
作用于所有用户,即默认配置
- /etc/profile
- /etc/bashrc
作用于当前用户,自定义配置
- ~/.bash_profile
- ~/.bashrc
调用时机:
用户登录:加载 /etc/bashrc -> 加载 /etc/profile -> 加载 ~/.bahshrc -> 加载~/.bash_profile
启动终端或者运行bash: 加载/etc/profile -> 加载 ~/.bashrc
作用于所有用户,即默认配置
作用于当前用户,自定义配置
用户登录:加载 /etc/bashrc -> 加载 /etc/profile -> 加载 ~/.bahshrc -> 加载~/.bash_profile
启动终端或者运行bash: 加载/etc/profile -> 加载 ~/.bashrc