冲突的cygwin和windows路径 [英] conflicting cygwin and windows path
问题描述
如果我的Windows路径如下所示:
c:\ruby\bin; c:\cygwin\bin
然后当我进入cgywin并输入ruby它将执行ruby从c:\ruby\bin,没有找到我的cygwin中安装的ruby。我必须排除该路径,所以cygwin会执行/ usr / bin中的一个。
但我需要这2个路径,因为我想在Windows中运行ruby。
无论如何,cygwin有自己的路径,而不是继承windows中的路径?
>
在您的.profile中添加一个条目,以设置您希望它在cygwin中的任何路径。
在cygwin中运行命令:
$< 〜/ .profile
然后将PATH环境变量设置为任何你想要的例如: p>
export PATH = / cygdrive / c / cygwin / bin
注意我不记得是否可以使用c:...版本的路径,但如果你发出env命令,你会看到它应该是什么。 p>
if my windows path looks like this:
c:\ruby\bin;c:\cygwin\bin
then when i go into cgywin and enter "ruby" it will execute the ruby from c:\ruby\bin, failing to find the ruby installed in my cygwin. I have to exclude that path so cygwin would execute the one from /usr/bin.
But i need those 2 paths, since i want to run ruby in windows too.
Anyway to have cygwin have its own path and not inherit those in windows?
thanks.
Add an entry into your .profile to set the path to whatever you want it to be in cygwin.
In cygwin run the command:
$ <favourite text editor eg vi> ~/.profile
Then set the PATH environment variable to whatever you want it to be e.g.:
export PATH=/cygdrive/c/cygwin/bin
NOTE I can't remember whether you can use the c:... version of the path, but if you issue the env command you will see what it should be.
这篇关于冲突的cygwin和windows路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!