Linux环境变量的配置文件

相关文件

作用于所有用户,即默认配置

  • /etc/profile
  • /etc/bashrc

作用于当前用户,自定义配置

  • ~/.bash_profile
  • ~/.bashrc

调用时机:

用户登录:加载 /etc/bashrc -> 加载 /etc/profile -> 加载 ~/.bahshrc -> 加载~/.bash_profile

启动终端或者运行bash: 加载/etc/profile -> 加载 ~/.bashrc

猜你喜欢

转载自blog.csdn.net/qq_36793147/article/details/80233189