microsoft / microsoft/WSL

"Open linux shell here" opens home directory instead of current folder when targeting linux disk

Open
#10,241 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

19044.3086

### WSL Version

Ubuntu 22.04 (wsl.exe --version is not valid command)

### Are you using WSL 1 or WSL 2?

- [X] WSL 2
- [ ] WSL 1

### Kernel Version

5.10.102.1

### Distro Version

Ubuntu 22.04

### Other Software

_No response_

### Repro Steps

1. Open explorer
2. Navigate to any folder in linux disk. For example, /var
3. Shift + right click in folder
4. Select "open linux shell here" in context menu

Alternatively:
1. Open the folder as project in ide
2. Open terminal for project from ide

### Expected Behavior

Newly opened terminal starts in selected folder ( /var )

### Actual Behavior

Newly opened terminal always starts in linux user home folder ( ~ )

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through Windows Explorer's "open linux shell here" action and an IDE project terminal, using /var as the selected folder. Trace the WSL launch path responsible for setting the initial working directory; done means the new terminal starts in the selected Linux folder rather than the user's home directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.