Cygwin 中环境变量的配置:
eg:
1. To see the current value of a particular
variable, use "printenv ".
  
   > printenv HOME
   /home/yap

2. ":"-separated paths :为分割符
3. set PATH in BASH Shell as follows:
   > export PATH=.:/home/yap/bin:/bin:/usr/local/bin
  
4. in TCSH Shell, you would do:
   > setenv PATH=.:/home/yap/bin:/bin:/usr/local/bin

This says to look first in the current directory ".", then /home/yap/bin,
then /bin, and finally /usr/local/bin.

5.
Better still, since you do not know what the previous value
of PATH is, it is best to simply append what you want to
the front or back of the current value of PATH.

> export PATH=.:/home/yap/bin:`printenv PATH`

 

=================================

 

刚刚装好的Cygwin总是返回找不到命令的错误代码,是因为没有为bash设置环境变量。
修改c:/cygwin目录下的cywin.bat文件:

@echo off

set HOMEPATH =
e:/cygwin/work/
path
% PATH %
; e:/cygwin/bin; e:/cygwin/sbin; e:/cygwin/usr/bin; e:/cygwin/usr/sbine:


C:
chdir C:/cygwin/bin

bash
-- login -
i