Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-20-2002, 01:55 PM   #1
LQ Newbie
Registered: Feb 2002
Posts: 12

Rep: Reputation: 0
setting cygwin enviroment variables

Hi everybody,

Well I would like to know how to set an enviroment varible in cygwin, I'm using the following command to do so:

$ export ARCH=cygnus

This command actually creates this variable with its respective value but when I close cygwin and then open a new session again the variable is gone.

I remenber that for a Linux computer I used:

setenv ARCH=cygnus

and this variable stay even afther I log off the computer. But I can't use this command in the cygwin I have.

Well I read that to set an variable in cygwin something like this must be done:

$ env ARCH=cygnus

But it doesn't create the variable.

So could any body tell me how to set an enviromental variable that won't desapper after endin the cygwin session

Thanks in advance.
Old 06-21-2002, 04:20 AM   #2
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well you are doing it the right way. It should be export. But you will have to place that in one of the scripts that is loaded when you login. For normal unix machines it would be .bashrc or .profile I assume for cygwin there must be something similar just search around. I don't have any setenv command here but I assume it was just a sript which added the environment variable to one of the login scripts.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I see all the enviroment variables? zvonSully Linux - Software 3 02-09-2005 08:39 AM
Enviroment variables johnnydangerous Fedora 3 02-07-2005 06:45 AM
enviroment variables cphase Linux From Scratch 7 01-19-2005 04:15 PM
Where to set enviroment variables vavoem Linux - Software 7 09-07-2004 02:13 AM
setting enviroment variables unimaginative Linux - General 5 01-08-2004 02:22 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration