Cygwin is a collection of tools which provide a Linux look and feel for Windows. It includes the equivalent of many Linux binaries, such as cat, nano, less, etc. It also includes a nice command prompt, far nicer than the built in Windows command prompt. I use Cygwin almost exclusively on Windows, since the available Window command prompts are so awful. You can run available Linux programs as well as any Windows programs from the Cygwin shell. I use Cygwin for working with Git, Vagrant and SSH mostly.
- The first step is installing Cygwin. To do this, you must download the installer. I recommend the 64 bit installer, assuming you’re on a 64 bit OS.
- When you run the installer, make sure to select “Install from Internet” on the “Choose A Download Source” page
- It doesn’t really matter where you install it, but I recommend the default path (or at least installing it to the root level of one of your hard drives).
- Picking a download site isn’t super important, I use a random one. The university ones (.edu) seem to work the best. I’d also recommend using http:// ones, as I’ve had firewall issues when using FTP before
- The select packages screen is very important. This is where you pick what Linux utilities will be installed and available via Cygwin. The ones I recommend are:
- All > Editors > nano (Light weight editor)
- All > Editors > VIM (Heavy weight, popular editor)
- All > Net > openssh (SSH client)
- All > Utils > ncurses (Screen utilities, gives you access to the clear command)
- All > Web > wget (Download files from the web)
- All > Devel > git (Distributed version control system)
- Proceed with your installation
Cygwin has some annoying default behavior that I would strongly recommend changing.
- Start Cygwin from your desktop or start menu
- Right click on the middle of the Windows title bar and click “Options…”
- Go to Mouse in the left menu, and uncheck “Copy on select”. This behavior will cause cygwin to copy highlighted text to your clipboard. When trying to paste something in Cygwin, this gets annoying as it’s very easy to accidentally select something, thus clearing your clipboard.
- Go to Terminal in the left menu, and change the type to “xterm-256color”
- Recommended: Change the cursor color to yellow or something else very visible (Looks > Colours > Cursor).
- Recommended: Change the cursor to an underscore (Looks > Cursor > Underscore). Makes it easier to spot.
Cygwin uses a Linux style directory structure, so if you’d like to access your C drive or similar, it’s mounted under
/cygwin/c. Please note, if your file or directory name has spaces in it, you’ll have to wrap the entire file path in quotes or use backslashes to escape the space, e.g.:
/cygdrive/c/Program\ Files\ \(x86\)/Git/bin/git.exe
"/cygdrive/c/Program Files (x86)/Git/bin/git.exe"
Where’s the executable?
If you don’t have a shortcut for Cygwin, you may be confused about how to start it. A cursory look around the installation directory won’t include any obvious
cygwin.exe files or the like.
That’s because Cygwin isn’t a terminal, its a Linux API layer. The terminal is MinTTY, which you can start manually from the
bin directory of your cygwin installation. It’ll be called
mintty.exe. Mine is located at
The Next Level
Once you’re setup with Cygwin, I recommend adding Tmux to the mix. It adds tabs & multi-pane support to MinTTY, and will significantly improve the way you work!