How to change default path in cmder

30

4

I have Cmder for Windows it has default path c:\Users\ username and I want to change it to any other path I like or want. How do I change it ?

Also cmder can replace cmd.exe meaning is it possible to set cmder as default program insted of cmd.exe

cmder image

Mandar Sant

Posted 2016-10-15T05:56:19.800

Reputation: 427

2

Did you tried to find information in docs? https://conemu.github.io

– Maximus – 2016-10-15T09:11:25.327

@ Maximus it is not conemu it is cmder and i tried searching docs but i didnt got it http://cmder.net/

– Mandar Sant – 2016-10-15T11:51:55.753

@MandarSant ffs please stop saying this. I have had so many hair pulling experiences with trying to configure conemu with git or the above issue. reading the doc is not enough, because this is not an intended problem ffs – samayo – 2019-08-16T23:35:55.243

Answers

50

As of cmder v1.3.6:

  1. Go to 'settings'

  2. In the settings group 'Startup', click on 'Tasks'

  3. Click the console you want to modify (e.g. cmd::Cmder, cmd::Cmder as Admin, bash::bash etc.)

  4. Click the button that says 'Startup dir...'

  5. Select the directory you want the console to start up in by default

  6. Enjoy

Moustache

Posted 2016-10-15T05:56:19.800

Reputation: 891

2Works for Cmder version 1.3.10 – jdhao – 2018-12-21T11:25:25.623

1Thanks, yes I haven't tested it for lower versions but it should be similar. – Moustache – 2018-12-21T15:56:40.197

1In fact, it is the latest version :) – jdhao – 2018-12-22T01:57:26.797

1Ah yes thanks :) I misread your comment as 1.3.1. – Moustache – 2018-12-22T13:04:42.730

3

It should be noted that this solution has side effect that "cmder here" contextual menu does not work anymore. It will always open the startup directory you have set up. See here for more information. sad :(

– jdhao – 2018-12-24T07:01:13.367

sadly this doesn't work – samayo – 2019-08-16T23:39:19.657

@samayo -- could you clarify in what way it doesn't work for you? – Moustache – 2019-08-18T17:59:28.983

The change doesn't have any effect. Cmder always starts in its default dir. I finally just created a shortcut and assinged the startup dir to it – samayo – 2019-08-18T18:06:11.930

Thanks for saving me 10 seconds of my life – Akshay Khot – 2019-11-03T03:57:56.093

8

In the init.bat file in ~/cmder/vendor, before

:: Set home path

add

@cd /d "C:/YOUR_PREFERRED_FOLDER/"

hiiambo

Posted 2016-10-15T05:56:19.800

Reputation: 289

i do not want to use cd when ever i open it the path which i have set should remain for ever after closing it also – Mandar Sant – 2016-10-15T07:21:37.260

It will stay. You are adding this to your init.bat to force it set a new home path. – hiiambo – 2016-10-15T21:04:34.277

where is init.bat file – Mandar Sant – 2016-10-16T03:36:25.937

1init.bat is in the ~/cmder/vendor directory. – Moustache – 2018-08-01T15:38:53.710

3

  1. Create a shortcut to cmdr
  2. Edit the shortcut, change the "Start in" path to the desired path
  3. Profit

Patrick Roza

Posted 2016-10-15T05:56:19.800

Reputation: 31

the easiest solution. :) – sybozz – 2020-01-23T04:32:27.920

2

For those who none of the above solutions worked (Cmder keeps reverting back to old path), here's what I did to fix it:

  1. Do a text search with Notepad++ in your Cmder directory for C:/OLD_FOLDER/
  2. Replace each found instance with your new directory: C:/YOUR_PREFERRED_FOLDER/.

For me, the issue was in ConEmu.xml which was preventing startup folder changes.

Porter Lyman

Posted 2016-10-15T05:56:19.800

Reputation: 21