Skip to content

Instantly share code, notes, and snippets.

@ikhsanalatsary
Last active January 17, 2024 16:31
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikhsanalatsary/2068a698a56d6b0a4a77a2e469650ed3 to your computer and use it in GitHub Desktop.
Save ikhsanalatsary/2068a698a56d6b0a4a77a2e469650ed3 to your computer and use it in GitHub Desktop.
Setup cmder with WSL 2

Using WSL 2

  1. Open cmder
  2. On the menu, open Settings option and then select Startup > Tasks from the menu tree (or just hit Win + Alt + T)
  3. Click the “+” button to add a new task and fill in the fields as follow:
  4. Name: {zsh::home}
  5. Task Parameters:
    /icon "%CMDER_ROOT%\icons\cmder.ico"
    
    Commands:
    cmd /c C:\Windows\System32\wsl.exe ~ -new_console:p:%USERPROFILE%
    
  6. Click Save Settings

using WSL 2

  1. Download latest cygwin1-20200531.dll.xz from https://cygwin.com/snapshots/ and unpack the file as cygwin1.dll into ConEmu\wsl\ (replacing the original file there)
  2. Download @Biswa96's wslbridge2 from https://github.com/Biswa96/wslbridge2/releases and unpack to the same directory
  3. Open cmder
  4. On the menu, open Settings option and then select Startup > Tasks from the menu tree (or just hit Win + Alt + T)
  5. Click the “+” button to add a new task and fill in the fields as follow:
  6. Name: {zsh::bridge}
  7. Task Parameters:
    /icon "%CMDER_ROOT%\icons\cmder.ico"
    
    Commands:
    set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe -cur_console:pm:/mnt -eConEmuBuild -eConEmuPID -eConEmuServerPID -l
    
  8. Click Save Settings
@queliom
Copy link

queliom commented Jul 27, 2022

Hello Abdul!

Regarding setup_cmder_wsl.md:

Is there a way to access a specific directory within WSL with the command? Using -new_console:d: doesn't work for me ;'(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment