snm*_*ald 6 windows command-line environment-variables
该组命令不保存的cmd.exe会话之间的值。如何在新的 cmd.exe 会话之间保存环境值?
例如 set 命令仅适用于我当前的会话:
set path=%path%;C:\Mingw\bin
Run Code Online (Sandbox Code Playgroud)
重新启动 cmd.exe 后,我的路径字符串已被重置。
可能的解决方案: .bashrc 或 .bash_profile 等效于 DOS
Ada*_*amV 11
根据此线程中的答案使用 SETX(从右侧作为相关问题链接): Is there a way to set Windows environment variables from the command line PERMANENTLY