Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将 windows 环境变量与 Cygwin 同步?
例如,在 CMD 中echo %inetroot%给出了项目构建的路径。是否可以将此环境变量传输到 Cygwin 以echo $inetroot提供相同的路径?
echo %inetroot%
echo $inetroot
谢谢!
使用该env程序以使 ... 或echo "$inetroot". 不过,我认为变量名是区分大小写的(在 Bash 和 MinGW 中)。
env
echo "$inetroot"
这些变量在 Windows 的 MinGW 中都可用(用户配置文件和全局)。同样,用于env列出它们或例如env|grep -i inetroot查找变量名称的正确大写版本。
env|grep -i inetroot