Conflicting cygwin and window path

if my window path looks like this:

C: \ ruby ​​\ Bin; C: \ Cygwin \ Bin

then when i go to cgywin and type β€œruby” it will execute ruby ​​with c: \ ruby ​​\ bin without finding the ruby ​​installed in my cygwin. I have to exclude this path so cygwin will execute one of / usr / bin.

But I need these 2 ways, since I want to run ruby ​​in windows too.

In any case, so that cygwin has its own path and does not inherit it in windows?

thanks.

+4
source share
1 answer

Add an entry to your .profile to set the path to what 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 what you want, for example:

 export PATH=/cygdrive/c/cygwin/bin 

NOTE. I cannot remember if you can use the c: ... version of the path, but if you issue the env command, you will see what it should be.

+2
source

Source: https://habr.com/ru/post/1306562/


All Articles