Reputation: 81
I am a beginner in this. I just install Cygwin. I have problem in access all my environment variable.
e.g. prior to install cygwin, i am using cmd prompt. I added a variable named "shotcut" with value "c:\my_doc\". In the c:\my_doc\, i create a shotcut.bat. The content is cd /dc:\my_doc.
Then, i added %shotcut% into a variable called "PATH". When i use cmd, once i type shotcut, it will move to c:\my_doc\
However, using cygwin terminal, i type shotcut and pops out command not found. What can i do in order to use all my environment variable.
Thanks
Upvotes: 1
Views: 2303
Reputation: 2043
Cygwin imports environment variables, so if you have one called "shotcut" as you say, the equivalent var called $shotcut
should exist in your Cygwin environment. Doing echo $shotcut
should output the path you set in your OS.
Alternatively, you could run the env
command, which will list the full set of vars currently set in your shell session, and look for your variable in there.
Upvotes: 2