-
Notifications
You must be signed in to change notification settings - Fork 2k
Integrating Cygwin
You can use the common Linux/Unix command lines on Windows (such as ls
, mv
, nano
, vim
, etc), by installing either Cygwin or WSL.
These familiar GNU/Posix tools can be installed on Windows, to provide the same experience as other Linux/Unix based operating systems, such as Ubuntu and macOS.
Cygwin is a free and open-source implementation of GNU/Posix tools, while WSL is a Microsoft product that allows the installation of a Linux distribution on top of Windows.
👉 NOTE: The Cmder full edition comes with Git for Windows, a project that already includes some of the tools mentioned above.
However, since it's based on a light fork of Cygwin (called MSYS2), it may lack some of the other binaries you may want to use.
You can install Cygwin alongside with Cmder full; However, to avoid duplicated binaries, it is recommended to install Cygwin alongside the Cmder mini edition and install Git within Cygwin.
- Install Cygwin
- https://cygwin.com/install.html
-
Recommended Install
apt-cyg
: https://github.com/kou1okada/apt-cyg (based on https://github.com/transcode-open/apt-cyg) - Add Cygwin installation to PATH (How to?)
- Install the 'chere' package in Cygwin (e.g. by running
apt-cyg install chere
inside Cygwin console). - Create a new task by clicking the
+
button in Startup > Tasks - Edit the name to something more recognizable (Cygwin)
- Figure out the install directory of Cygwin and replace
<cygwin_dir>
with it in the following instructions - Change Task parameters to
/icon <cygwin_dir>\Cygwin-Terminal.ico
- Change Commands to
<cygwin_dir>\cygwin.bat -c "/bin/xhere /bin/bash.exe '%V'"
- (Optional) Set a Hotkey like
LShift + Alt + 3
to open Cygwin in Cmder
After the installation, you can add Cygwin binaries to PATH
so that you can use them natively in a Windows shell (e.g. Cmder).
-
Open System Properties using either:
- Control Panel → System → Advanced system settings
- ⊞ Win + Pause/Break
-
⊞ Win + R →
sysdm.cpl
→ Enter
-
Click on Environment Variables… in the Advanced tab
-
From the System variables (or User variables if you are not an admin),
select the Path variable and click Edit… -
Depending on what version of Windows you have:
- Windows 10: Click on New… button and enter the binaries path.
-
Windows 7: Append a
;
character to the end of line, then enter the binaries path.
✅ Note: This should the installation directory followed by
\bin
for the binaries directory.Example for default installation path:
e.g. for 64-bit:C:\cygwin64\bin
e.g. for 32-bit:C:\cygwin\bin
In case you have installed Cygwin in a custom folder, you should substitute
C:\cygwin
with your installation directory.Tip: Don't forget to prepend the ; on Windows 7 and older, e.g.:
[current_path]
;C:\Cygwin\bin
-
Press the Ok button where needed, until all open windows are saved.
Further discussions can be made here.