Unverified50% confidenceFactExact time
Environment variable assignments (such as $env:FOO=bar or export FOO=bar) are only effective in the current Shell process and its child processes, and become invalid when the terminal is closed; to take effect permanently, they need to be written into the Shell startup script (such as .bashrc, .zshrc, $PROFILE) or system environment variables.
1
Sources
50%
Confidence
Long-term
Relevance
10/12/2026
First Seen
Sources
Related Entities
Related Claims
Unverified写入环境变量后必须执行 source ~/.bashrc 或 source ~/.zshrc 重新加载配置才能生效,否则新终端窗口不会包含手动设置的变量69% similarUnverifiedAfter modifying the .env file, the terminal must be restarted for the new configuration to take effect, because most shells read environment configuration only once at startup.66% similarUnverifiedShell glob expansion is completed before command execution, so programs like sed see the expanded real paths rather than the original strings containing wildcards.65% similarUnverifiedAfter configuring environment variables, the terminal window must be reopened for them to take effect, because the terminal reads environment variables only once at startup.64% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1010053API
curl https://kongchang.com/api/v1/knowledge/claims/1010053MCP
get_claim(id=1010053)