Cygwin User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Cygwin User’s Guide i Cygwin User’s Guide Cygwin User’s Guide ii Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc. Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .5 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select . .7 1.7 What’s new and what changed in Cygwin 1.7 . .7 1.7.1 What’s new and what changed from 1.7.15 to 1.7.16 . .7 1.7.2 What’s new and what changed from 1.7.14 to 1.7.15 . .7 1.7.3 What’s new and what changed from 1.7.13 to 1.7.14 . .7 1.7.4 What’s new and what changed from 1.7.12 to 1.7.13 . .7 1.7.5 What’s new and what changed from 1.7.11 to 1.7.12 . .7 1.7.6 What’s new and what changed from 1.7.10 to 1.7.11 . .8 1.7.7 What’s new and what changed from 1.7.9 to 1.7.10 . .8 1.7.8 What’s new and what changed from 1.7.8 to 1.7.9 . .9 1.7.9 What’s new and what changed from 1.7.7 to 1.7.8 . .9 1.7.10 What’s new and what changed from 1.7.6 to 1.7.7 . .9 1.7.11 What’s new and what changed from 1.7.5 to 1.7.6 . .9 1.7.12 What’s new and what changed from 1.7.3 to 1.7.5 . 10 Cygwin User’s Guide iv 1.7.13 What’s new and what changed from 1.7.2 to 1.7.3 . 10 1.7.14 What’s new and what changed from 1.7.1 to 1.7.2 . 10 1.7.15 OS related changes . 11 1.7.16 File Access related changes . 11 1.7.17 Network related changes . 13 1.7.18 Device related changes . 13 1.7.19 Other POSIX related changes . 14 1.7.20 Security related changes . 14 1.7.21 Miscellaneous . 14 2 Setting Up Cygwin 16 2.1 Internet Setup . 16 2.1.1 Download Source . 16 2.1.2 Selecting an Install Directory . 16 2.1.3 Local Package Directory . 17 2.1.4 Connection Method . 17 2.1.5 Choosing Mirrors . 17 2.1.6 Choosing Packages . 17 2.1.7 Download and Installation Progress . 18 2.1.8 Shortcuts . 18 2.1.9 Post-Install Scripts . 18 2.1.10 Troubleshooting . 18 2.2 Environment Variables . 18 2.2.1 Overview . 18 2.2.2 Restricted Win32 environment . 19 2.3 Changing Cygwin’s Maximum Memory . 19 2.4 Internationalization . 20 2.4.1 Overview . 20 2.4.2 How to set the locale . 21 2.4.3 The Windows Console character set . 22 2.4.4 Potential Problems when using Locales . 23 2.4.5 List of supported character sets . 23 2.5 Customizing bash . 25 3 Using Cygwin 26 3.1 Mapping path names . 26 3.1.1 Introduction . 26 3.1.2 The Cygwin Mount Table . 26 3.1.3 UNC paths . 29 Cygwin User’s Guide v 3.1.4 The cygdrive path prefix . 29 3.1.5 Using native Win32 paths . 30 3.1.6 Using the Win32 file API in Cygwin applications . 30 3.1.7 Additional Path-related Information . 31 3.2 Text and Binary modes . 31 3.2.1 The Issue . 31 3.2.2 The default Cygwin behavior . 31 3.2.3 Binary or text? . 32 3.2.4 Programming . ..