Cygwin User's Guide

DJ Delorie

Pierre Humblet

Geoffrey Noer

Legal Notice
Table of Contents
1. Cygwin Overview
What is it?
Are the Cygwin tools free software?
A brief history of the Cygwin project
Expectations for UNIX Programmers
Expectations for Windows Programmers
Highlights of Cygwin Functionality
Introduction
Supporting both Windows NT and 9x
Permissions and Security
File Access
Text Mode vs. Binary Mode
ANSI C Library
Process Creation
Signals
Sockets
Select
2. Setting Up Cygwin
Cygwin Contents
Installing the binary release
Installing the source code
Directory Structure
Environment Variables
NT security and the ntsec usage
NT security
Process privileges
File permissions
New since Cygwin release 1.1
The mapping leak
New acl API
New setuid concept
Customizing bash
3. Using Cygwin
Mapping path names
Introduction
The Cygwin Mount Table
Cygwin Mount Table Strategies
Additional Path-related Information
Text and Binary modes
The Issue
The default Cygwin behavior
Example
Binary or text?
Programming
File permissions
Special filenames
DOS devices
POSIX devices
The .exe extension
The @pathnames
The CYGWIN environment variable
Cygwin Utilities
cygcheck
cygpath
kill
mkgroup
mkpasswd
passwd
mount
ps
umount
strace
regtool
4. Programming with Cygwin
Using GCC with Cygwin
Console Mode Applications
GUI Mode Applications
Debugging Cygwin Programs
Building and Using DLLs
Building DLLs
Linking Against DLLs
Defining Windows Resources
List of Examples
2-1. /etc/passwd
2-2. /etc/group
2-3. /etc/passwd:
2-4. /etc/group:
3-1. Displaying the current set of mount points
3-2. POSIX-like mount setup
3-3. Identity mount setup
3-4. Using @pathname
3-5. Example cygpath usage
3-6. Specifying signals with the kill command
3-7. Setting up the groups file
3-8. Setting up the passwd file
3-9. Displaying the current set of mount points
3-10. Adding mount points
3-11. Changing the default prefix
4-1. Building Hello World with GCC
4-2. Compiling with -g
4-3. "break" in gdb
4-4. Debugging with command line arguments