Environment Variables

Before starting bash, you must set some environment variables, some of which can also be set or modified inside bash. Cygnus provides you with a .bat file where the most important ones are set before bash in launched. This is the safest way to launch bash initially. The .bat file is installed by default in \cygnus\cygwin-b20/cygnus.bat and pointed to in the Start Menu. You can edit it to your liking.

The CYGWIN variable is used to configure many global settings for the Cygwin runtime system. Initially you can leave CYGWIN unset or set it to tty (e.g. to support job control with ^Z etc...) using a syntax like this in the DOS shell, before launching bash.

C:\Cygnus\> set CYGWIN=tty notitle glob

The PATH environment variable is used by Cygwin applications as a list of directories to search for executable files to run. This environment variable is converted from Windows format (e.g. C:\WinNT\system32;C:\WinNT) to UNIX format (e.g., /WinNT/system32:/WinNT) when a Cygwin process first starts. Set it so that it contains at least the Cygnus bin directory C:\cygnus\cygwin-b20\H-i586-cygwin32\bin before launching bash.

The HOME environment variable is used by many programs to determine the location of your home directory and we recommend that it be defined. This environment variable is also converted from Windows format when a Cygwin process first starts. Set it to point to your home directory before launching bash.

make uses an environment variable MAKE_MODE to decide if it uses command.com or /bin/sh to run command lines. If you are getting strange errors from make about "/c not found", set MAKE_MODE to UNIX at the command prompt or in bash.

C:\Cygnus\> set MAKE_MODE=UNIX

/Cygnus$ export MAKE_MODE=UNIX

The TERM environment variable specifies your terminal type. You can set it to cygwin.

The LD_LIBRARY_PATH environment variable is used by the Cygwin function dlopen () as a list of directories to search for .dll files to load. This environment variable is converted from Windows format to UNIX format when a Cygwin process first starts. Most Cygwin applications do not make use of the dlopen () call and do not need this variable.