1

Note: this is a follow-up question to this answer.

I updated my PATH environment variable using Windows 7's Environment Variables dialogue.

However, it seems that the only way to get Cygwin to pull the updated PATH is to reboot my machine, which is obviously far from an ideal solution, and plain problematic for server users.

Is it possible to get Cygwin to see updated Windows environment variables without rebooting the machine?

5
  • which environment variables ? How do you updated them ?
    – matzeri
    Oct 27, 2017 at 20:46
  • @matzeri The details are in the original question, but I changed the PATH system environment variable from within Windows 7 the usual way - by searching and opening "Edit the system environment variables" and clicking the "Environment variables" button. Oct 27, 2017 at 20:49
  • You could run export PATH="/directory you want to add:$PATH", and it won't require rebooting.
    – jlinjiang
    Nov 30, 2020 at 18:58
  • I would start a new terminal window. Are the changes visible there? Apr 20, 2023 at 10:59
  • If they are not visible in a new terminal window, try the solution by user "Ron andKim Stengel" in this thread. Apr 20, 2023 at 11:07

1 Answer 1

1

If you're updating Windows environment variables, you should be able to restart the Cygwin window and see the updated environment.

Alternatively, you can use Cygwin environment variables like:

export TEST_VARIABLE=value

Now the $TEST_VARIABLE will "value" you can confirm this by:

echo $TEST_VARIABLE
value

This should show you the above output.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .