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
$SHELL = /bin/sh
How can I launch mintty with
/usr/bin/bash as default shell?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There are several different ways to do it:
bashas a command-line argument to mintty, as mentioned by Salton.
SHELLenvironment 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.
You can launch
mintty bash for bash to be default
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