Open Cygwin at specific location

Cygwin is a great Unix emulation for Windows. A killer feature, to my mind, is its ability to handle arbitrary long file names (e.g., when moving or deleting files), which is for some ominous reasons still impossible in current versions of Windows.

A very useful command in the Cygwin repository is chere: It adds a context menu entry that allows to start the Cygwin Terminal from the current directory.

Here are the steps to install:

  1. Install Cygwin. See http://cygwin.org/ for details.
  2. In the package selection dialog, select chere, which is located below Shells, for installation.
  3. Open a Cygwin Terminal as Administrator
  4. Type chere -i to install a context menu entry. You may also try chere -h to get more info. Running chere -u uninstalls the context menu entry.
  5. Let’s try it out: Open your file manager and right-click into a folder and select Bash Prompt Here.
  6. A terminal pops up with the current working directory set to the selected folder.

References

This solution and some alternatives are listed in a stackoverflow thread.

 

Leave a Reply