Cygwin

Cygwin is a collection of free software tools originally developed by Cygnus Solutions to allow various versions of Microsoft Windows to act somewhat like a UNIX system. It aims mainly at porting software that runs on POSIX systems (such as GNU/Linux systems, BSD systems, and UNIX systems) to run on Windows with little more than a recompilation. Programs ported with Cygwin work best on Windows NT, Windows 2000, Windows XP, and Windows Server 2003, but some may run acceptably on Windows 95 and Windows 98. Cygwin is currently maintained by employees of Red Hat and others.

Similar functionality is nowadays offered by Microsoft's Services for UNIX package, which includes the Interix subsystem.

Contents

Description

Cygwin consists of a library that implements the POSIX system call API in terms of Win32 system calls, a GNU development toolchain (such as GCC and GDB) to allow basic software development tasks, and some application programs equivalent to common programs on the UNIX system. It added the X Window System in 2001.

The package also includes a library called MinGW that works with the native MSVCRT library (Windows API) included with Windows; MinGW has less RAM and disk overhead, operates under a permissive license, and can link to any software, but it does not implement as much of the POSIX specification as the Cygwin library does.

Unfortunately, Cygwin has no support for Unicode; neither does it support any character sets except the current Windows and OEM codepages of your system (e.g., for a Russian user, the only codepages available will be CP1251 and CP866, but not KOI8-R, ISO 8859-5, UTF-8 or anything else).

Red Hat normally licenses the Cygwin library under the GNU General Public License with an exception to allow linking to any free software whose license conforms to the Open Source Definition. (Red Hat also makes available expensive licenses to redistribute programs that use the Cygwin library under proprietary terms.)

You can subscribe to one of many Cygwin-related mailing lists at the Cygwin Mailing Lists (http://cygwin.com/lists.html) page.

History

Cygwin began in 1995 as a project of Steve Chamberlain, a Cygnus engineer who observed that NT and 95 used COFF as their object file format, and that GNU already included support for x86 and COFF, and the C library newlib; so at least in theory it should not be difficult to retarget GCC and get a cross compiler producing executables that would run on Windows. This proved to be so in practice, and a prototype came up quickly.

The next step was to attempt to bootstrap the compiler on a Windows system, but this required enough emulation of Unix to let the GNU configure shell script run, which requires a shell like bash, which in turn requires fork and standard I/O. Windows includes similar functionality, so the Cygwin library proper just needs to translate calls and manage private versions of data, such as file descriptors.

By 1996, other engineers had joined in, since it was clear that cygwin would be a useful way to provide Cygnus' embedded tools hosted on Windows systems (the previous strategy had been to use DJGPP). It was especially attractive because it was possible to do a three-way cross-compile, for instance to use a hefty Sun workstation to build, say, a Windows-x-MIPS cross-compiler, which was faster than using the PC of the time. Starting around 1998, Cygnus also began offering the Cygwin package as a product of interest in its own right.

Cygwin Tips

  • Install Cygwin to the default directory, C:\cygwin\ for consistency.
  • When installing, check cygrunsrv to allow for running sshd as a Windows service
  • To use rxvt as the preferred console, create a Windows shortcut with the Target set to C:\cygwin\bin\rxvt.exe --loginShell -sr and Start in set to C:\cygwin\bin.
  • To enlarge the console window and add a title, add -geometry "80x50" -title Cygwin to the Target.
  • To start an SSH session, add -e ssh user@machine.name.com to the Target.
  • To change the default home directory to My Documents, create an environment variable called HOME with value of C:\DOCUME~1\USERNAME\MYDOCU~1 (where USERNAME is your Windows login username).
  • Edit /etc/passwd and change /home/username to /c/DOCUME~1/USERNAME/MYDOCU~1 (like the HOME variable)
  • Create an environment variable called SHELL with value of /bin/bash.
  • Create an environment variable called CYGWIN with value of binmode ntsec tty.
  • Make sure c:\cygwin\bin; is added to the Path environment variable.
  • To mount prefix from /cygdrive to / type this command once, mount -s --change-cygdrive-prefix /
  • Or keep cygdrive as is and create symbolic links (e.g. ln -s C: /C) for every drive.
  • Emacs and vi are the most popular editors but Nano is the easiest to use.
  • Create a file called .bash_profile in the HOME directory containing the following lines:
    • alias dir='ls -lav --color=auto'
    • EDITOR=nano; export EDITOR
    • VISUAL=nano; export VISUAL

See also

External links

fr:Cygwin he:Cygwin ja:Cygwin no:Cygwin pl:Cygwin pt:Cygwin sk:Cygwin uk:Cygwin

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools