Using mintty as default terminal on Cygwin and default shell as bash
There are several different ways to do it:
- Specify
bash
as a command-line argument to mintty, as mentioned by Salton. - Set the Windows
SHELL
environment variable to /usr/bin/bash. - Make sure you have an /etc/passwd (see mkpasswd(1)) in your Cygwin environment, and set the shell for your UID to /usr/bin/bash. Cygwin doesn't supply a chsh or usermod command, so you'll probably have to edit the file by hand if you want to use this method.
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