Cygwin User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Cygwin User’s Guide Cygwin User’s Guide Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. Table of Contents 1. Cygwin Overview.............................................................................................................1 What is it?......................................................................................................................1 Quick Start Guide for those more experienced with Windows.............................1 Quick Start Guide for those more experienced with UNIX ...................................1 Are the Cygwin tools free software? .........................................................................2 A brief history of the Cygwin project........................................................................2 Highlights of Cygwin Functionality..........................................................................3 Introduction.........................................................................................................3 Supporting both Windows NT and 9x ............................................................3 Permissions and Security ..................................................................................4 File Access............................................................................................................4 Text Mode vs. Binary Mode ..............................................................................5 ANSI C Library ...................................................................................................5 Process Creation..................................................................................................5 Signals ..................................................................................................................6 Sockets..................................................................................................................6 Select.....................................................................................................................7 2. Setting Up Cygwin ...........................................................................................................9 Internet Setup................................................................................................................9 Download Source ...............................................................................................9 Selecting an Install Directory ............................................................................9 Local Package Directory ..................................................................................10 Connection Method..........................................................................................10 Choosing Mirrors..............................................................................................10 Choosing Packages...........................................................................................10 Download and Installation Progress .............................................................11 Icons....................................................................................................................11 Post-Install Scripts ............................................................................................11 Environment Variables ..............................................................................................11 Changing Cygwin’s Maximum Memory................................................................12 NT security and usage of ntsec...............................................................................13 NT security ........................................................................................................13 Process privileges .............................................................................................15 File permissions ................................................................................................15 NT SIDs in Cygwin ..........................................................................................17 The mapping leak .............................................................................................18 The ACL API .....................................................................................................19 New setuid concept..........................................................................................20 Switching User Context ...................................................................................22 Special values of user and group ids .............................................................22 Customizing bash.......................................................................................................23 3. Using Cygwin..................................................................................................................25 Mapping path names.................................................................................................25 Introduction.......................................................................................................25 The Cygwin Mount Table................................................................................25 Additional Path-related Information.............................................................26 Text and Binary modes ..............................................................................................26 The Issue ............................................................................................................26 The default Cygwin behavior .........................................................................27 Example..............................................................................................................27 Binary or text? ...................................................................................................28 Programming ....................................................................................................28 File permissions..........................................................................................................29 Special filenames ........................................................................................................29 DOS devices.......................................................................................................29 POSIX devices ...................................................................................................29 The .exe extension.............................................................................................31 iii The /proc filesystem ........................................................................................31 The @pathnames...............................................................................................31 The CYGWIN environment variable.......................................................................32 Cygserver ....................................................................................................................33 What is Cygserver?...........................................................................................33 Cygserver command line options ..................................................................34 How to start Cygserver....................................................................................35 How to use the Cygserver services................................................................36 The Cygserver configuration file....................................................................36 Cygwin Utilities..........................................................................................................37 cygcheck.............................................................................................................37 cygpath...............................................................................................................38 dumper...............................................................................................................39 getfacl .................................................................................................................40 kill .......................................................................................................................40 mkgroup.............................................................................................................42 mkpasswd..........................................................................................................42 mount .................................................................................................................44 passwd................................................................................................................46 ps.........................................................................................................................47 regtool.................................................................................................................48 setfacl..................................................................................................................49 ssp .......................................................................................................................51 strace...................................................................................................................53 umount...............................................................................................................54 Using Cygwin effectively