Entering Cygwin command line (bash login) from Windows cmd.exe ?
Mon Aug 7 17:39:35 GMT 2023
On 8/7/23, Roland Mainz via Cygwin wrote:
> On Sat, Jul 29, 2023 at 6:18 AM Roland Mainz wrote:
>> Is there an official way to enter the Cygwin command line (e.g. bash
>> login) from Windows cmd.exe, e.g. if someone ssh's into a Windows
>> machine he/she ends/up in a cmd.exe and not bash...
Years ago this was the default way to start cygwin (I don't think I've
changed it, but who knows??)
bash --login -i
There's a Cygwin.bat in /etc/defaults that needs to be copied to the
cygwin root directory:
cd /d "%~dp0bin" && .\bash --login -i
"cd /d" - Use the /D switch to change current drive in addition to
changing current directory for a drive.
"%~dp0" gives the path of the script, so if the .bat file is in
C:\cygwin then "%~dp0bin" expands to C:\cygwin\bin
More information about the Cygwin