Cygwin User's Guide

Total Page:16

File Type:pdf, Size:1020Kb

Cygwin User's Guide 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 . ..
Recommended publications
  • CST8207 – Linux O/S I
    Mounting a Filesystem Directory Structure Fstab Mount command CST8207 - Algonquin College 2 Chapter 12: page 467 - 496 CST8207 - Algonquin College 3 The mount utility connects filesystems to the Linux directory hierarchy. The mount point is a directory in the local filesystem where you can access mounted filesystem. This directory must exist before you can mount a filesystem. All filesystems visible on the system exist as a mounted filesystem someplace below the root (/) directory CST8207 - Algonquin College 4 can be mounted manually ◦ can be listed in /etc/fstab, but not necessary ◦ all mounting information supplied manually at command line by user or administrator can be mounted automatically on startup ◦ must be listed /etc/fstab, with all appropriate information and options required Every filesystem, drive, storage device is listed as a mounted filesystem associated to a directory someplace under the root (/) directory CST8207 - Algonquin College 5 CST8207 - Algonquin College 6 Benefits Scalable ◦ As new drives are added and new partitions are created, further filesystems can be mounted at various mount points as required. ◦ This means a Linux system does not need to worry about running out of disk space. Transparent ◦ No application would stop working if transferred to a different partition, because access to data is done via the mount point. ◦ Also transparent to user CST8207 - Algonquin College 7 All known filesystems volumes are typically listed in the /etc/fstab (static information about filesystem) file to help automate the mounting process If it is not listed in the /etc/fstab file, then all appropriate information about the filesystem needs to be listed manually at the command line.
    [Show full text]
  • Pexpect Documentation Release 4.8
    Pexpect Documentation Release 4.8 Noah Spurrier and contributors Apr 17, 2021 Contents 1 Installation 3 1.1 Requirements...............................................3 2 API Overview 5 2.1 Special EOF and TIMEOUT patterns..................................6 2.2 Find the end of line – CR/LF conventions................................6 2.3 Beware of + and * at the end of patterns.................................7 2.4 Debugging................................................8 2.5 Exceptions................................................8 2.6 Pexpect on Windows...........................................9 3 API documentation 11 3.1 Core pexpect components........................................ 11 3.2 fdpexpect - use pexpect with a file descriptor.............................. 23 3.3 popen_spawn - use pexpect with a piped subprocess.......................... 23 3.4 replwrap - Control read-eval-print-loops................................. 24 3.5 pxssh - control an SSH session...................................... 25 4 Examples 33 5 FAQ 35 6 Common problems 39 6.1 Threads.................................................. 39 6.2 Timing issue with send() and sendline()................................. 39 6.3 Truncated output just before child exits................................. 40 6.4 Controlling SSH on Solaris....................................... 40 6.5 child does not receive full input, emits BEL............................... 40 7 History 41 7.1 Releases................................................. 41 7.2 Moves and forks............................................
    [Show full text]
  • Linux on the Road
    Linux on the Road Linux with Laptops, Notebooks, PDAs, Mobile Phones and Other Portable Devices Werner Heuser <wehe[AT]tuxmobil.org> Linux Mobile Edition Edition Version 3.22 TuxMobil Berlin Copyright © 2000-2011 Werner Heuser 2011-12-12 Revision History Revision 3.22 2011-12-12 Revised by: wh The address of the opensuse-mobile mailing list has been added, a section power management for graphics cards has been added, a short description of Intel's LinuxPowerTop project has been added, all references to Suspend2 have been changed to TuxOnIce, links to OpenSync and Funambol syncronization packages have been added, some notes about SSDs have been added, many URLs have been checked and some minor improvements have been made. Revision 3.21 2005-11-14 Revised by: wh Some more typos have been fixed. Revision 3.20 2005-11-14 Revised by: wh Some typos have been fixed. Revision 3.19 2005-11-14 Revised by: wh A link to keytouch has been added, minor changes have been made. Revision 3.18 2005-10-10 Revised by: wh Some URLs have been updated, spelling has been corrected, minor changes have been made. Revision 3.17.1 2005-09-28 Revised by: sh A technical and a language review have been performed by Sebastian Henschel. Numerous bugs have been fixed and many URLs have been updated. Revision 3.17 2005-08-28 Revised by: wh Some more tools added to external monitor/projector section, link to Zaurus Development with Damn Small Linux added to cross-compile section, some additions about acoustic management for hard disks added, references to X.org added to X11 sections, link to laptop-mode-tools added, some URLs updated, spelling cleaned, minor changes.
    [Show full text]
  • GNU Grep: Print Lines That Match Patterns Version 3.7, 8 August 2021
    GNU Grep: Print lines that match patterns version 3.7, 8 August 2021 Alain Magloire et al. This manual is for grep, a pattern matching engine. Copyright c 1999{2002, 2005, 2008{2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Introduction ::::::::::::::::::::::::::::::::::::: 1 2 Invoking grep :::::::::::::::::::::::::::::::::::: 2 2.1 Command-line Options ::::::::::::::::::::::::::::::::::::::::: 2 2.1.1 Generic Program Information :::::::::::::::::::::::::::::: 2 2.1.2 Matching Control :::::::::::::::::::::::::::::::::::::::::: 2 2.1.3 General Output Control ::::::::::::::::::::::::::::::::::: 3 2.1.4 Output Line Prefix Control :::::::::::::::::::::::::::::::: 5 2.1.5 Context Line Control :::::::::::::::::::::::::::::::::::::: 6 2.1.6 File and Directory Selection:::::::::::::::::::::::::::::::: 7 2.1.7 Other Options ::::::::::::::::::::::::::::::::::::::::::::: 9 2.2 Environment Variables:::::::::::::::::::::::::::::::::::::::::: 9 2.3 Exit Status :::::::::::::::::::::::::::::::::::::::::::::::::::: 12 2.4 grep Programs :::::::::::::::::::::::::::::::::::::::::::::::: 13 3 Regular Expressions ::::::::::::::::::::::::::: 14 3.1 Fundamental Structure ::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • ARM Code Development in Windows
    ARM Code Development in Windows By: Ali Nuhi This guide will describe how to develop code to be run on an embedded Linux system using an ARM processor (specifically the OMAP3530). Environment The Cygwin bash shell will be the environment used for code development. Download it from the below link. http://cygwin.com/install.html READ THE SITE. Download setup.exe and choose the packages you want to install. Some helpful packages to download are: -gcc4-core,g++ etc. (for c and c++ compiling of normal programs) -git core files and completion (version control system) -wget (utility to download files from the internet via HTTP and FTP) -VIM (text editor) -Xemacs (another text editor, better than vim) -nano (simple command line text editor) If you still use windows notepad for writing code please atleast upgrade to notepad++. Toolchain We will be compiling and creating files using CodeSourcery g++ lite toolchains. This is a modified version of GCC which will create files specifically for ARM target systems. Download this at: http://www.codesourcery.com/sgpp/lite/arm/portal/release1803 Download the Windows installer and execute. You can let it install as is unless you have some other install scheme on your computer. I highly recommend reading the getting started pdf that comes with CodeSourcery. Once it’s fully installed open up Cygwin and execute the below lines. $ export CYGPATH=cygpath $ export CYGPATH=c:/cygwin/bin/cygpath If you installed Cygwin to another directory then you must edit the second line. To use the compiler type the following and hit tab twice to see all of the possible options you have.
    [Show full text]
  • Molecular Dynamics Simulations in Drug Discovery and Pharmaceutical Development
    processes Review Molecular Dynamics Simulations in Drug Discovery and Pharmaceutical Development Outi M. H. Salo-Ahen 1,2,* , Ida Alanko 1,2, Rajendra Bhadane 1,2 , Alexandre M. J. J. Bonvin 3,* , Rodrigo Vargas Honorato 3, Shakhawath Hossain 4 , André H. Juffer 5 , Aleksei Kabedev 4, Maija Lahtela-Kakkonen 6, Anders Støttrup Larsen 7, Eveline Lescrinier 8 , Parthiban Marimuthu 1,2 , Muhammad Usman Mirza 8 , Ghulam Mustafa 9, Ariane Nunes-Alves 10,11,* , Tatu Pantsar 6,12, Atefeh Saadabadi 1,2 , Kalaimathy Singaravelu 13 and Michiel Vanmeert 8 1 Pharmaceutical Sciences Laboratory (Pharmacy), Åbo Akademi University, Tykistökatu 6 A, Biocity, FI-20520 Turku, Finland; ida.alanko@abo.fi (I.A.); rajendra.bhadane@abo.fi (R.B.); parthiban.marimuthu@abo.fi (P.M.); atefeh.saadabadi@abo.fi (A.S.) 2 Structural Bioinformatics Laboratory (Biochemistry), Åbo Akademi University, Tykistökatu 6 A, Biocity, FI-20520 Turku, Finland 3 Faculty of Science-Chemistry, Bijvoet Center for Biomolecular Research, Utrecht University, 3584 CH Utrecht, The Netherlands; [email protected] 4 Swedish Drug Delivery Forum (SDDF), Department of Pharmacy, Uppsala Biomedical Center, Uppsala University, 751 23 Uppsala, Sweden; [email protected] (S.H.); [email protected] (A.K.) 5 Biocenter Oulu & Faculty of Biochemistry and Molecular Medicine, University of Oulu, Aapistie 7 A, FI-90014 Oulu, Finland; andre.juffer@oulu.fi 6 School of Pharmacy, University of Eastern Finland, FI-70210 Kuopio, Finland; maija.lahtela-kakkonen@uef.fi (M.L.-K.); tatu.pantsar@uef.fi
    [Show full text]
  • Cygwin User's Guide
    Cygwin User’s Guide Cygwin User’s Guide ii Copyright © Cygwin authors 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 . .4 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 . .7 1.7.1 What’s new and what changed in 3.2 .
    [Show full text]
  • File System, Files, and *Tab /Etc/Fstab
    File system, files, and *tab File system files directories volumes, file systems mounting points local versus networked file systems 1 /etc/fstab Specifies what is to be mounted where and how fs_spec: describes block special device for remote filesystem to be mounted fs_file: describes the mount point fs_vfstype: describes the type of file system fs_mntops: describes the mount options associated with the filesystem 2 /etc/fstab cont. fs_freq: used by the dump command fs_passno: used by fsck to determine the order in which checks are done at boot time. Root file systems should be specified as 1, others should be 2. Value 0 means that file system does not need to be checked 3 /etc/fstab 4 from blocks to mounting points metadata inodes directories superblocks 5 mounting file systems mounting e.g., mount -a unmounting manually or during shutdown umount 6 /etc/mtab see what is mounted 7 Network File System Access file system (FS) over a network looks like a local file system to user e.g. mount user FS rather than duplicating it (which would be a disaster) Developed by Sun Microsystems (mid 80s) history for NFS: NFS, NFSv2, NFSv3, NFSv4 RFC 3530 (from 2003) take a look to see what these RFCs are like!) 8 Network File System How does this actually work? server needs to export the system client needs to mount the system server: /etc/exports file client: /etc/fstab file 9 Network File System Security concerns UID GID What problems could arise? 10 Network File System example from our raid system (what is a RAID again?) Example of exports file from
    [Show full text]
  • Fira Code: Monospaced Font with Programming Ligatures
    Personal Open source Business Explore Pricing Blog Support This repository Sign in Sign up tonsky / FiraCode Watch 282 Star 9,014 Fork 255 Code Issues 74 Pull requests 1 Projects 0 Wiki Pulse Graphs Monospaced font with programming ligatures 145 commits 1 branch 15 releases 32 contributors OFL-1.1 master New pull request Find file Clone or download lf- committed with tonsky Add mintty to the ligatures-unsupported list (#284) Latest commit d7dbc2d 16 days ago distr Version 1.203 (added `__`, closes #120) a month ago showcases Version 1.203 (added `__`, closes #120) a month ago .gitignore - Removed `!!!` `???` `;;;` `&&&` `|||` `=~` (closes #167) `~~~` `%%%` 3 months ago FiraCode.glyphs Version 1.203 (added `__`, closes #120) a month ago LICENSE version 0.6 a year ago README.md Add mintty to the ligatures-unsupported list (#284) 16 days ago gen_calt.clj Removed `/**` `**/` and disabled ligatures for `/*/` `*/*` sequences … 2 months ago release.sh removed Retina weight from webfonts 3 months ago README.md Fira Code: monospaced font with programming ligatures Problem Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like -> , <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet. Solution Download v1.203 · How to install · News & updates Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations.
    [Show full text]
  • Scons API Docs Version 4.2
    SCons API Docs version 4.2 SCons Project July 31, 2021 Contents SCons Project API Documentation 1 SCons package 1 Module contents 1 Subpackages 1 SCons.Node package 1 Submodules 1 SCons.Node.Alias module 1 SCons.Node.FS module 9 SCons.Node.Python module 68 Module contents 76 SCons.Platform package 85 Submodules 85 SCons.Platform.aix module 85 SCons.Platform.cygwin module 85 SCons.Platform.darwin module 86 SCons.Platform.hpux module 86 SCons.Platform.irix module 86 SCons.Platform.mingw module 86 SCons.Platform.os2 module 86 SCons.Platform.posix module 86 SCons.Platform.sunos module 86 SCons.Platform.virtualenv module 87 SCons.Platform.win32 module 87 Module contents 87 SCons.Scanner package 89 Submodules 89 SCons.Scanner.C module 89 SCons.Scanner.D module 93 SCons.Scanner.Dir module 93 SCons.Scanner.Fortran module 94 SCons.Scanner.IDL module 94 SCons.Scanner.LaTeX module 94 SCons.Scanner.Prog module 96 SCons.Scanner.RC module 96 SCons.Scanner.SWIG module 96 Module contents 96 SCons.Script package 99 Submodules 99 SCons.Script.Interactive module 99 SCons.Script.Main module 101 SCons.Script.SConsOptions module 108 SCons.Script.SConscript module 115 Module contents 122 SCons.Tool package 123 Module contents 123 SCons.Variables package 125 Submodules 125 SCons.Variables.BoolVariable module 125 SCons.Variables.EnumVariable module 125 SCons.Variables.ListVariable module 126 SCons.Variables.PackageVariable module 126 SCons.Variables.PathVariable module 127 Module contents 127 SCons.compat package 129 Module contents 129 Submodules 129 SCons.Action
    [Show full text]
  • A Brief Introduction to the Use of Shell Variables
    A Brief Introduction to the Use of Shell Variables Norman Matloff July 25, 2001 Contents 1 Two Popular Shells: tcsh and bash 1.1 Overview There are many different shells available for Unix systems. Here we focus on two of the most popular ones, tcsh and bash. Other shells tend to be very similar to one or both of these. Your Unix account has a preset login shell for you, typically tcsh in academic settings and bash in Linux. When you log in, a shell of the given type is automatically started for you. (This can be seen in the file /etc/passwd.) If you wish to temporarily run a different shell, just type its name. If you wish to change your login shell, run the chsh command. 1.2 Command Commonality Among Shells Most of what people tend to think of as “basic Unix commands” are actually shell commands which are common to almost all of the shells. So for example you could type cd /abc/def to change to the directory /abc/def in either tcsh or bash.1 2 Shell Variables 2.1 Introduction to Shell Variable Syntax The tcsh shell uses “set” and = for the assignment operation. For example, 1Technically speaking, the “change directory” command for Unix itself is chdir(), a function which must be called from a program. A shell is a program, and when for example you issue the cd command to a shell, that program in turn calls chdir(). 1 set x = 3 would assign the value 3 to the shell variable x.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [Show full text]