Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
      • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
  • Under Startup, set startup options to Specified name task --> {bash}
@sangimed

This comment has been minimized.

Copy link

sangimed commented Dec 14, 2017

Awesome, thank you @nickautomatic

@walkerjam

This comment has been minimized.

Copy link

walkerjam commented Dec 14, 2017

Nice one :)

@ghost

This comment has been minimized.

Copy link

ghost commented Jan 5, 2018

Was stuck on the last bullet, didn't know how to set it as default, thank you so much

@kkorus

This comment has been minimized.

Copy link

kkorus commented Feb 12, 2018

Use -new_console:d:%CMDER_START% if you want to start cmder in current directory (right click)

@asangam

This comment has been minimized.

Copy link

asangam commented Feb 22, 2018

Thanks man @nickautomatic

@daevski

This comment has been minimized.

Copy link

daevski commented Feb 25, 2018

When trying open cmder in current directory with "Cmder Here" (in windows context menu) like @kkorus said, %CMDER_START% doesn't work for me. Can't figure out why, maybe because I'm using Bash... In my case I'm just using the following:
"D:\Program Files\Git\bin\sh.exe" -l

settings xml conemu 180206 64 alpha 2018-02-24 22 44 24

Hope this helps someone, I just spent like 2 hours trying stuff out. I was so happy when this worked!

@willhs

This comment has been minimized.

Copy link

willhs commented Mar 26, 2018

I had to encapsulate the entire command in ""s otherwise it would try to run 'C:\Program' (even though that path was already enclosed in ""s)

@madasebrof

This comment has been minimized.

Copy link

madasebrof commented May 16, 2018

For right-click open in a directory with the latest version of git bash. Note double set of quotes per the previous comment.

Command:

""C:\Program Files\Git\bin\sh.exe" -l -new_console:d:%CMDER_START%"

image

@F4R3LL

This comment has been minimized.

Copy link

F4R3LL commented May 18, 2018

Thank you ! <3 @nickautomatic

@stephane303

This comment has been minimized.

Copy link

stephane303 commented Sep 26, 2018

The link to cmder_mini is not working any more ...

@diegobiazin

This comment has been minimized.

Copy link

diegobiazin commented Jan 8, 2019

Thank you! worked for me @daevski

@MisterY

This comment has been minimized.

Copy link

MisterY commented May 13, 2019

In v190331, under Startup/Tasks, there is an option "Add/refresh default tasks" which will re-check the installed shells and add the Bash entry automatically.

image

But, for me, Git Bash was already found (at no.7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.