Cygwin User's Guide

Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.


Table of Contents

1. Cygwin Overview
What is it?
Quick Start Guide for those more experienced with Windows
Quick Start Guide for those more experienced with UNIX
Are the Cygwin tools free software?
A brief history of the Cygwin project
Highlights of Cygwin Functionality
Introduction
Permissions and Security
File Access
Text Mode vs. Binary Mode
ANSI C Library
Process Creation
Signals
Sockets
Select
2. Setting Up Cygwin
Internet Setup
Download Source
Selecting an Install Directory
Local Package Directory
Connection Method
Choosing Mirrors
Choosing Packages
Download and Installation Progress
Icons
Post-Install Scripts
Troubleshooting
Environment Variables
Changing Cygwin's Maximum Memory
Using Windows security in Cygwin
Overview
File permissions
Special values of user and group ids
The POSIX permission mapping leak
Switching the user context
Switching the user context with password authentication
Switching the user context without password, Method 1: Create a token from scratch
Switching the user context without password, Method 2: LSA authentication package
Switching the user context without password, Method 3: With password
Switching the user context, how does that all fit together?
Customizing bash
3. Using Cygwin
Mapping path names
Introduction
The Cygwin Mount Table
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
Special characters in filenames
Case sensitive filenames
POSIX devices
The .exe extension
The /proc filesystem
The /proc/registry filesystem
The @pathnames
The CYGWIN environment variable
Implemented options
Removed options
Cygserver
What is Cygserver?
Cygserver command line options
How to start Cygserver
How to use the Cygserver services
The Cygserver configuration file
Cygwin Utilities
cygcheck
cygpath
dumper
getfacl
kill
mkgroup
mkpasswd
mount
passwd
ps
regtool
setfacl
ssp
strace
umount
Using Cygwin effectively with Windows
Pathnames
Console Programs
Cygwin and Windows Networking
The cygutils package
Creating shortcuts with cygutils
Printing with cygutils
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/passwd, tweaked:
2.3. /etc/group, tweaked:
3.1. Displaying the current set of mount points
3.2. Example mount point to enforce case-insensitivity on cygdrive paths
3.3. Using @pathname
3.4. Example cygcheck usage
3.5. Searching all packages for a file
3.6. Example cygpath usage
3.7. Using the kill command
3.8. Setting up group entry for current user with different domain/group separator
3.9. Using an alternate home root
3.10. Displaying the current set of mount points
3.11. Adding mount points
3.12. 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