Skip to content
David Refoua edited this page Jan 18, 2019 · 14 revisions

You can install either Cygwin or WSL to use the familiar Unix/Linux tools on Windows.

Cygwin is a free and open-source implementation of GNU/Posix tools (like ls, nano, vim, etc).

Integrating Cygwin with Cmder

  1. Install Cygwin
  2. Install the 'chere' package in Cygwin (e.g. by running apt-cyg install chere inside Cygwin console).
  3. Create a new task by clicking the + button in Startup > Tasks
  4. Edit the name to something more recognizable (Cygwin)
  5. Figure out the install directory of Cygwin and replace <cygwin_dir> with it in the following instructions
  6. Change Task parameters to /icon <cygwin_dir>\Cygwin-Terminal.ico
  7. Change Commands to <cygwin_dir>\cygwin.bat -c "/bin/xhere /bin/bash.exe '%V'"
  8. (Optional) Set a Hotkey like LShift + Alt + 3 to open Cygwin in Cmder

Add Cygwin to Path

After the installation, you can Cygwin binaries to PATH so that you can use them natively in a Windows shell (e.g. Cmder).

  1. Open System Properties using either:

    • Control Panel → System → Advanced system settings
    • Win + Pause/Break
  2. Click on Environment Variables… in the Advanced tab

  3. From the System variables (or User variables if you are not an admin),
    select the Path variable and click Edit…

  4. Depending on what version of Windows you have:

    • Windows 10: Click on New… button and enter the following:
    • Windows 7: Append a ; character to the end of line, then enter the following:
    C:\Cygwin\bin
    

    Note: In case you didn't install Cygwin to its default folder, you should substitute this path with your installation directory.
    This should the installation directory followed by \bin for the binaries directory.
    e.g.: C:\path\to\the\cygwin\bin

    Tip: Don't forget to prepend the ; on Windows 7 and older, e.g.:
    [current_path];C:\Cygwin\bin

  5. Press the Ok button where needed, until all open windows are saved.