如何在shell脚本设置当前shell的环境变量

如何在shell脚本设置当前shell的环境变量

能否使用shell脚本设置当前shell的环境变量,Your shell process has a copy of the parent's environment and no access to the parent process's environment whatsoever.

August 14, 2021
1 min read
29
0
0
0

Your shell process has a copy of the parent's environment and no access to the parent process's environment whatsoever. When your shell process terminates any changes you've made to its environment are lost. Sourcing a script file is the most commonly used method for configuring a shell environment, you may just want to bite the bullet and maintain one for each of the two flavors of shell.

linux

shell

环境变量

最多评论

最多收藏

最多收藏