From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id 595733857803 for ; Mon, 7 Aug 2023 17:39:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 595733857803 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1bef8f0904eso3514894fac.2 for ; Mon, 07 Aug 2023 10:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691429977; x=1692034777; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=M9+JvasN+GkQDijqgliO8AgejXO2N4juSxoItHD50ro=; b=VVfLeK5R/VJnQXqcgJngBqTa9mxneZCoMYmVj6hw8YFMblg77eDTlvmVAgw9LCzQHs DS0XodsNjr335K9ZswK5C3+zRdK7Yvs52m3/BUT84db+JIjwgj5pw3SHgVXDsIE4dxPa rx5y9B+er6GdpsWGpbQDvG3f6BBY3aA238Fg9rUuS4Em4hKVtaeUM8S18NwxjfnXF4tL ug6pkFhoamek4jzDjqpEYtbPZyMs6pwoPbvipxdv7pnVBlk6j+SVKMvRzSCG0ldR7mCh 6g6G4TU6cVYG8ZYnl5HNe2GxQet29B4p6PFinTkywSmRfV16E45ylDny2LCIyjC6PzaU 6UQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691429977; x=1692034777; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M9+JvasN+GkQDijqgliO8AgejXO2N4juSxoItHD50ro=; b=kVSPO2Vp64YlYFdNm4A6dvCLHGcdZF8YSciX37qJZ4M0xtDNF2B/plWdKVizF9nLJB KknXrHKbcDy0ctH7azzyeZGgPRU+m8JcwbfdNO9+ujaX/BCy0WA+Z4DJtjJ31PkQyuDM 1i3HgcpPt0UWdHsRydOZR4eTPARNtsdnWsCwOhXWTNAlz6MgfI1HqwYXA3vM0bzlXfM6 N7lR9B46F2jzXuS6yBTXlbg4V0IsSxqTlC9U382VKtqAn6nVLu0tLuJj2WSSF0Ppueo3 z+c9ZQ4RKcK6JYmlmwhPddQF4dpmAdLHTUczGw4dc9rVXWff6ZacyfSH05eTG78nfu57 /7fg== X-Gm-Message-State: AOJu0YyqrPdj7YGqnlpa40Y3FgbQZ6vpesYORwJt8e26bXixmj1xZX9C U/JpIvGUEWQsgWO7+lYBM//0clELYXAe8AjfsYgsHz2V X-Google-Smtp-Source: AGHT+IGmDFODARDwbLj4qH0nhv3wJtU4TaGWktOSvIVGDzsHUaSR6SdTp29MEVQp3FpxZ6NnyUGmXzQzj42nvhQxcw4= X-Received: by 2002:a05:6871:89f:b0:1bb:973a:6752 with SMTP id r31-20020a056871089f00b001bb973a6752mr11792443oaq.25.1691429976460; Mon, 07 Aug 2023 10:39:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6638:2605:b0:423:6d3b:713 with HTTP; Mon, 7 Aug 2023 10:39:35 -0700 (PDT) In-Reply-To: References: From: Lee Date: Mon, 7 Aug 2023 13:39:35 -0400 Message-ID: Subject: Re: Entering Cygwin command line (bash login) from Windows cmd.exe ? To: Roland Mainz Cc: cygwin@cygwin.com, Roland Mainz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 8/7/23, Roland Mainz via Cygwin wrote: > On Sat, Jul 29, 2023 at 6:18=E2=80=AFAM 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... > > ping! Years ago this was the default way to start cygwin (I don't think I've changed it, but who knows??) C:\cygwin>type Cygwin.bat @echo off C: chdir C:\cygwin\bin bash --login -i There's a Cygwin.bat in /etc/defaults that needs to be copied to the cygwin root directory: C:\cygwin>type etc\defaults\Cygwin.bat @echo off setlocal enableextensions set TERM=3D cd /d "%~dp0bin" && .\bash --login -i C:\cygwin> "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 Regards Lee