• Skip to primary navigation
  • Skip to main content
  • Skip to footer

She's Gotta Develop It.com

Notes on web development and programming

  • About
  • Blog
  • Projects
  • code snippets

@snippets | Wednesday // December 5, 2018

How to open Windows Ubuntu (WSL) in cmder from a specific directory

Use WSL in cmder and add it to your context menu to "Ubuntu Here"

cmder Windows 10 windows ubuntu WSL

3

Updated 4/22/2019! My old config stopped working…

cmder integrated context menu customization into the Settings panel and I was able to get Git Bash to work, but Windows Ubuntu (aka WSL) kept opening in my $HOME directory although I wanted it to open in a specific directory after right clicking inside of a specific folder and selecting “Ubuntu Here”. After a lot of trial and error I got this to work.

Old setting

In Settings > Startup > Tasks, I already had a task for using Ubuntu labeled {ubuntu} set this way (shown through the screenshot):

Image of cmder settings to open WSL from the context menu
Old Settings in cmder

In Settings > Integration: I’d already created a menu item called “Ubuntu Here” and with this setting (which works just find for git bash):

  • Command: {ubuntu} -cur_console:n:d:”%V”
New setting

In Startup > Tasks, I created a new task and labeled it {wsl::here} and added this command (you can label yours whatever you’d like): %windir%\system32\wsl.exe -new_console

Then back in Integration settings: I changed the command for “Ubuntu Here” to just point to that newly created startup task: Command: {wsl::here}

Make sure you select the “Register” button before saving. If you don’t, it won’t actually save.

My settings panel screenshots are below:
A screenshot of my cmder settings to open WSL in a specific directory from the context menu
Updated cmder settings for WSL
A screenshot of my cmder settings to open WSL in a specific directory from the context menu
A screenshot of my cmder settings to open WSL in a specific directory from the context menu

This worked, but I’m open to other ideas.

I went through some GH tickets and an extensive google search and couldn’t find anything that answered my questions but good ole time wasting trial & error worked wonders.

Bonus: my settings panel screenshots are below:

And this is my setting for opening WSL from cmder in the Linux home directory instead of the Windows one.

cmder settings for opening in the linux home directory
cmder settings for opening in the linux home directory
  • https://github.com/cmderdev/cmder/issues/1163
  • https://github.com/cmderdev/cmder/issues/1063
  • https://conemu.github.io/en/BashOnWindows.html
  • https://stackoverflow.com/questions/21852965/open-in-conemu-right-click-menu-windows-7

Post navigation

Previous:
Reintroducing …. myself
Next:
This Week in Coding: #011

Reader Interactions

2 comments on “How to open Windows Ubuntu (WSL) in cmder from a specific directory”

  1. Matt says

    July 31, 2019 at 5:09 pm

    Thanks a lot, I was struggling to work this one out.

    Reply
    • akudo says

      October 11, 2019 at 2:36 am

      You’re welcome. Glad this was helpful.

      Reply

Leave a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Footer

Archives

  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • November 2018
  • June 2017
  • May 2017
  • December 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016

Categories

  • @snippets
  • ~/notes
  • Code Reviews
  • Meetups & Events
  • Starter Packs
  • Weekly Updates
  • What I Learned Series

Github

shesgottadevelopit (shesgottadevelopit)

shesgottadevelopit

shesgottadevelopit
atlanta via chicago
https://shesgottadevelopit.com
Joined on Feb 06, 2016
16 Public Repositories
dev-log
fit-connect-app
global-content-blocks
iheartcode
JS-DC-Lab-01
JS-DC-Lab-02
lemonade-wp
npm-link-dev
nunjucks-starter
pixartJSdeploy
practicalJS-TodoList
sans-static
virtualhost
W3C_HTML5.1x
wamp-vhost
_s
3 Public Gists
Copyright 2023 ❤ She's Gotta Develop It.com