I've installed new Cygwin: 1.7 and couldn't create a Console! tab for Cygwin like before. Is there anybody there who has successfully used Cygwin inside Console?


I've used Cygwin in ConsolePortable. Sure, you can do it without a cygwin.bat file; just put /path/to/cygwin/bin/bash --login -i as your shell. There is a lot more flexibility if you use a bat file to launch it, though; for example, you can specify a home directory outside the Cygwin folder. Assumptions:


Edit ConsolePortable/Data/Settings/console.xml:

<!-- console.xml -->
    <console shell="..\cygwin\cygwin.bat" init_dir="..\cygwin" >
<!-- ... etc ... -->

Edit cygwin.bat:

echo off
set SHELL=/bin/bash
REM -> you can set home here if you don't want /cygwin/home/username, e.g. HOME=%~dp0..\..\doc\unix
bin\bash --login -i

Yes, I use Cygwin with Console2. In settings, create a tab with the following shell value:

C:\cygwin\bin\bash.exe --login -i`

That's it (assuming you installed Cygwin to the default directory, otherwise change the path to bash.exe accordingly).

Personally, I've gone one step further and set a default directory for Cygwin to start in, by using this shell value:

C:\cygwin\bin\bash.exe --login -i -c "cd /cygdrive/c/Users/Tom/Stuff/; exec /bin/bash"

You'd need to alter the /cygdrive/c/Users/Tom/Stuff/ part to something appropriate for your file system.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.