How can I add cygwin/bin to the search path in Windows XP?
I installed Cygwin on my Windows XP machine. How can I add c:\cygwin\bin
to the %PATH%
in such a way that it persists?
My autoexec.bat
is empty, and I assume it's no longer the right place for that. Where's the best place to do this?
Solution 1:
Right click on my computer and select properties. In the Advanced tab, there is a button called Environment Variables. The PATH
variable is in there, just add a semicolon and then the cygwin path to the end of the existing value, so it looks like this:
C:\WINDOWS\system32;C:\WINDOWS\;C:\WINDOWS\System32\Wbem;...;c:\cygwin\bin
Solution 2:
To add to your user profile path you can do the following from the command line using the setx
command which is built into Windows Vista and above. In earlier versions of Windows you can use the Windows Resource Kit to get it.
Say Cygwin in installed in c:\cygwin
, do:
SETX path c:\cygwin;c:\cygwin\bin;%path%
Or for you, as user only:
SETX -m path c:\cygwin;c:\cygwin\bin;%path%