Cmder is a very useful Windows terminal software. While you can configure other terminals, this article shows you how to add mSYS2 terminals to Cmder.

Open Cmder Settings – Launch – Tasks and click the + button to add a task:

Fill in the following parameters on the right:

In the msys2 installation directory, there is a startup script msys2_shell.cmd, which can be used to start the Msys2 console. The startup command is as follows:

"D:\Program Files\msys2\msys2_shell.cmd" -msys2 -defterm -here -no-start
Copy the code

By default, msys2 is installed in C:\msys64, but I installed it in D:\Program Files\msys2.

Then the CMD startup script has the following parameters:

  • -msys2Set msys2 as shell
  • -deftermUse the default terminal as the terminal, usually the current terminal
  • -hereUse the current directory as the bash working directory for Msys2
  • -no-startDo not usestartCommand, not adding this will cause another window to open

Here, just follow these parameters, there is no need to change other parameters.

At the same time, the above additional parameters can also specify the window icon, use /icon, very simple.

Then you can open a new window and use Msys2 directly in the Cmder!