Unverified50% confidenceCautionExact time
One should avoid using the form export PATH="~/bin:$PATH", because ~ will not be expanded by system calls.
1
Sources
50%
Confidence
Long-term
Relevance
10/12/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedThe contents of the PATH environment variable, when read by a system call (such as execvp), do not go through the shell's expansion process, so a ~ in PATH is treated as an ordinary character-based directory.79% similarUnverifiedThe root cause of ~ sometimes working and sometimes failing in PATH is that it can only be expanded when some intermediate link happens to invoke the shell to handle it.65% similarUnverifiedThe "not recognized as an internal or external command" error when executing the claude command is caused by the installation path not being added to the system PATH environment variable.63% similarUnverified写入环境变量后必须执行 source ~/.bashrc 或 source ~/.zshrc 重新加载配置才能生效,否则新终端窗口不会包含手动设置的变量63% similarUnverifiedIf typing gemini results in a "command not found" prompt, the most likely cause is that the global installation path has not been added to the system environment variable PATH, which can be resolved by restarting the terminal or confirming that the npm global bin directory is in PATH.60% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1012616API
curl https://kongchang.com/api/v1/knowledge/claims/1012616MCP
get_claim(id=1012616)