- A C library for programming cognitive experiments on Windows
Cygwin is a Linux-like environment for Windows. Like on Linux platforms, path names within Cygwin conform to the Posix standard. This has the following consequences:
/
) rather than the backslash (\
) is used as
directory delimiter.C:\cygwin
to Windows, is cygwin's root directory
(/
). All paths start in this directoryConfused? Here is a table with some directory names written in the Windows and Cygwin way:
Windows name | Cygwin name |
C:\cygwin |
/ |
C:\cygwin\home |
/home |
C:\cygwin\usr\local |
/usr/local |
C: |
/cygdrive/c |
D:\temp |
/cygdrive/d/temp |
When you start up the bash shell, its working directory will be /home/yourname
,
where yourname
is your login name on Windows. The first time you log in, this
directory will be empty. For Windows programs, the path to this directory will be
C:\cygwin\home\yourname
You can either use this directory as a working directory when you are programming, or you can choose a directory of your own, and make a link to that directory in your Cygwin home directory. How this can be done is explained here.
cd DIR
The basic command to change your working directory is cd
. The argument to that
command is the Cygwin path name of the directory you want to go to.
cd /usr/local
will change your working directory to /usr/local
You can also use relative path names (i.e. relative to your current working directory).
Suppose you are in /usr/local
and want to go to /usr/bin
. You can
either type
cd /usr/bin
but you can also type
cd ../bin
where the ..
means: the directory below my current working directory.
Spaces within file names will have to be escaped with a backslash (\
)
cd /cygdrive/c/Program\ Files
means: home directory of the current user.
cd ~
will change the working directory to your home directory.