There is already one answered the question at Best way to use a shell with Cygwin in Windows 7. That is to start Cygwin with C:\cygwin\bin\mintty.exe -
With that $SHELL = /bin/sh
How can I launch mintty with /usr/bin/bash
as default shell?
There is already one answered the question at Best way to use a shell with Cygwin in Windows 7. That is to start Cygwin with C:\cygwin\bin\mintty.exe -
With that $SHELL = /bin/sh
How can I launch mintty with /usr/bin/bash
as default shell?
There are several different ways to do it:
bash
as a command-line argument to mintty, as mentioned by Salton.SHELL
environment variable to /usr/bin/bash.From the mintty(1) manpage:
INVOCATION
If a program name is supplied on the command line, this is executed
with any additional arguments given. Otherwise, mintty looks for a
shell to execute in the SHELL environment variable. If that is not
set, it reads the user's default shell setting from /etc/passwd. As a
last resort, it falls back to /bin/sh. If a single dash is specified
instead of a program name, the shell is invoked as a login shell.
suppose this file name is mintty.bat, double click this file will open a mintty terminal, and with bash, path & pwd all settled down.
@echo off
C:\cygwin64\bin\mintty.exe /bin/bash --login -i
/path/to/mintty.exe [-i icon-file] -
, with the trailing-
we get a login shell which I usually start a screen session. – ryenus Apr 21 '14 at 01:28/etc/passwd
gets overwritten (sometimes?) when upgrading with Cygwin setup. – Dominykas Mostauskis Mar 12 '15 at 13:24-
? Talk about difficult to google.. – Roy Truelove Aug 19 '16 at 01:21