Linux - Cygwin - Unix-like environment under Windows

What Is Cygwin ?

Cygwin is a Linux-like environment under Windows. The installation directory (by default, c:\cygwin) is the root of the Unix-like file system, which contains bin, etc, home, tmp, and usr directories as would be found on a GNU/Linux or other Unix system.

Cygwin consists of two parts:

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.

Articles Related

What Can Cygwin Do?

With Cygwin, administrators can easily remote login to any PC, fix problems within a UNIX/Linux shell, on any Windows machine and run shell command scripts. Sophisticated shell command scripts can be created with standard shells, sed, awk, etc. Standard Windows command line tools can even be intermixed within the UNIX/Linux shell script environment to administer the Windows system. Over the years, UNIX/Linux system administrators have developed a large toolbox set of management scripts for their UNIX/Linux machines. Cygwin provides the ability to continue using these scripts on Windows machines.

Installation

  • Download and run the setup.exe file.
  • Choose the package

I’d personally suggest scrolling up in the list and installing the Devel packages as well, as this will allow you to compile and run many UNIX programs on your Windows computer. If you would like to use emacs, xemacs, or vi/vim locally on your Windows computer, install the Editors packages. Additional packages can be installed later by re-running Setup.exe.

  • Finish

How to begin

To begin, click on the Cygwin desktop icon, or choose the Cygwin entry from your start menu, to open a Cygwin terminal window. Within this window, the GNU bash shell is running, with POSIX syntax (directory separators are '/', not '\').

Initially, the current (working) directory is /home/user, where user is your Windows login name.

Support

My Windows logon name has a space in it

Don't use this directory if your Windows login name contains a space; make another and use that one instead, e.g., by typing these commands at the bash prompt:

mkdir /home/bob
echo "export HOME=/home/bob" >>.bashrc
echo "export HOME=/home/bob" >>.bash_profile
cp .bashrc .bash_profile /home/bob
echo "cd" >>.bashrc

Close your Cygwin terminal window and open another one; your current directory should now be /home/bob (or whatever you chose to call it). See the Cygwin FAQ (look for “My Windows logon name has a space in it”) for other solutions to this common problem.

Documentation / Reference

  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at del.icio.us
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Digg
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Ask
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Google
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at StumbleUpon
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Technorati
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Live Bookmarks
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Yahoo! Myweb
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Facebook
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Yahoo! Bookmarks
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at Twitter
  • Bookmark "Linux - Cygwin - Unix-like environment under Windows" at myAOL
 
linux/cygwin.txt · Last modified: 2010/07/08 10:22 by gerardnico