You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could not access starting directory \\wsl$\Ubuntu\home error 0x8007010bΒ #6995
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
Reacted by sMuro, Grant Ramsay, sibeov, Szymon BeΕus, Allan Szewczyk, ssay-work, Zach Prado, Kyle Godbey, Leverson Carlos, Mike B and 155 more
Reacted by francisca0308, Jeong Hyunseok , Luis Gomes, Michael R. and Rafael Pereira
Reacted by Melon Mouse, Beanie, T Jakobsen, Vincent Wang, Josep, gnothi, Dark, Shane McFadden, Douglas Medeiros, Irakli Tchitadze and 7 more
Reacted by Lorenzo Bernardi, Melon Mouse, Beanie, Daniel Gomes Pereira, Vincent Wang, Josep, gnothi, Dark, Lizzy Gallagher, Rixin Li and 19 more
Just to reiterate, I was having the same issue. This is specific to terminal right now. Running just wsl.exe on powershell works fine and ticking the "Use parent process directory" box in terminal settings seems to have fixed it for me too.
Reacted by Carlos Gonzalez, sMuro, Thomas Gachet, Grant Ramsay, sibeov, Allan Szewczyk, ssay-work, Kyle Godbey, Freek van Hemert, JoΓ£o Pedro MagalhΓ£es and 25 more
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
Perfect, just had the same issue and the above worked for me - either run in cmd prompt or tick the above setting. Lifesaver!!
I have several WSL distributions, need to tick this for all of them if using Windows Terminal. Must have been some sneaky stealth update last night?
Edit again: This seems to happen if you have a custom startup directory - I did since I don't want to start my Linux in the windows %USERPROFILE% every time. However, If I tick the box, then untick and set the "\\wsl$\Ubuntu\blahblah\home" path to my home directory manually again it all works as before, and I start up in the correct (Linux) home dir.
Reacted by Zach Prado, Kyle Godbey, Makhmud Mustafabek Galy, JoΓ£o Almeida, Raniere de Souza Santos, rtxa, Andre Kirsten, Scott Webster, Cyril-B, Kit Jeffcoat and 21 more
Reacted by Simone Sestito, Michael R., Emerson Morais and Hwakerrr
Edit again: This seems to happen if you have a custom startup directory - I did since I don't want to start my Linux in the windows %USERPROFILE% every time. However, If I tick the box, then untick and set the "\wsl$\Ubuntu\blahblah\home" path to my home directory manually again it all works as before, and I start up in the correct (Linux) home dir.
Thanks. This worked for me.
I added a few lines to my .zshrc/.bashrc that references my %USERPROFILE% variable. If we end up there, navigate to where we want the default to be instead. Replace ~ with your desired start directory.
if [[ $(pwd) == /mnt/c/Users/mostlikely-your-pc-name ]]
then
cd ~
fi
Reacted by Grant Ramsay, Julio Espadas, Tri R.A. Wibowo, EngineerMC42, Eduard, Simone Sangeniti, Big Mouth Zhang, Miguel Rodriguez, Jeong Hyunseok , Max Charrier and 4 more
I had the same problem.
It seems that the directory path notation has changed from slash to backslash.
Before: //wsl$/linux-distro/home/user
After: \\wsl$\linux-distro\home\user
Reacted by Maximilian Konter, JoΓ£o Pedro MagalhΓ£es, Fichtl, David Warden, Geoffrey van Wyk, rmarzooqur-glam, SecretAardvark, Julian Meinking, Emil Jansson, ihommani and 90 more
Reacted by Bat, Dominik Falis, Bruno Wolff, Gian, Clayton Whittaker, sonalmahajan01, Qizhe Tang, Michael R. and spark
Reacted by Dark, Jorge Orpinel, Isaac Cisneros, Zhgsimon, Josh Hunt, Douglas Medeiros, Dominik Falis, Danny Verbeek, Huy Vu~, Hindol and 11 more
I had the same issue, ticking "Use parent process directory" indeed fixes the described error but starts my shell in /mnt/c/WINDOWS/system32 which I don't like. Manually setting it to:
//wsl$/Ubuntu-20.04/home/linuxUsername
Sets the start dir to my Linux user's home dir ~/ as it should be.
Reacted by Maximilian Konter, Emil Jansson, Nurlan Bayaman, MatΓas Haeussler, Mario Noriega, Hayden, rathnak, Zachary Joswick, Daniel Dewhurst, Xaver Fabian and 3 more
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
Worked for me, but it started me on System32. Went back into settings and unchecked "User parent process directory". Loaded another tab and it is back to working normally as it did previously with the correct profile loaded.
Just go to Windows Terminal>Settings>Ubuntu and replace the starting directory field with Z:\home\username (replace Z: with whatever drive your WSL is mapped on and username with the relevant username/folder name).
Edit again: This seems to happen if you have a custom startup directory - I did since I don't want to start my Linux in the windows %USERPROFILE% every time. However, If I tick the box, then untick and set the "\wsl$\Ubuntu\blahblah\home" path to my home directory manually again it all works as before, and I start up in the correct (Linux) home dir.
Thanks. This worked for me.
I added a few lines to my .zshrc/.bashrc that references my %USERPROFILE% variable. If we end up there, navigate to where we want the default to be instead. Replace ~ with your desired start directory.
if [[ $(pwd) == /mnt/c/Users/mostlikely-your-pc-name ]]
then
cd ~
fi
This one works for me, better to start at home directory.
I ticked "Use parent process directory" but left command line as wsl.exe ~ -d Debian and no further changes were required.
Thanks for the info
Reacted by ζΊζΊηθε ι, Rookie_Zoe, Matheus Souza, Hypnoes Liu, dream-hack, Kyle, Farrizal Alchudry Mutaqien, Tyler Szabo, Ruslan Tumarkin, JoΓ£o Victor Ramires GuimarΓ£es Brito and 11 more
Reacted by ε³η«εΏ and krish shah
Reacted by Adg0, Manoj Chandrashekar, He Ruiliang, Aldairng, Gytax, bess, Farrizal Alchudry Mutaqien, Tyler Szabo, JoΓ£o Victor Ramires GuimarΓ£es Brito, ε³η«εΏ and 1 more
Reacted by Antonio V
Reacted by lily.t, rtxa, Paul Grejaldo, Rabab Ahmed, Emil Jansson, Guilherme Pereira, Royce, Clint Priest, mt-u, Timor Gruber and 17 more
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
Just adding another voice here. Had the same problem and this worked for me.
Something else I've noticed when using OSC9 codes is if I was on a WSL shell and ssh somewhere where I've configured my PS to use OSC9 also, is that when I kill Windows Terminal and it comes back, it remembers and it tries to cd into the path that only existed remotely, and so it errors.
I guess I need to disable OSC9 on remote shells on my setup. π€
Alan Fregtman (@darkvertex) Alas, that's one of the worst parts of this whole "working directory" thing. I wish we could restore remote working directories!
Yeha, startup directory works till you actually want to access the non-wsl filesystem,
\\\\wsl$\\Ubuntu-22.04\\mnt works but \\\\wsl$\\Ubuntu-22.04\\mnt\\c causes it to crash with [process exited with code 4294967295 (0xffffffff)]
No suggestions actually seem to work here, or anywhere.
There are so many threads, and no one in any of them has a solid answer to how to change the startup directory. Just piles of "try this" changes that don't actually work.
I had the same problem. It seems that the directory path notation has changed from slash to backslash. Before: //wsl$/linux-distro/home/user After: \\wsl$\linux-distro\home\user
I also encountered the same problem. How did you finally solve it?
On Mon, 3 Apr 2023, 10:32 ligang, ***@***.***> wrote:
I had the same problem. It seems that the directory path notation has
changed from slash to backslash. Before: //wsl$/linux-distro/home/user
After: \\wsl$\linux-distro\home\user
I also encountered the same problem. How did you finally solve it?
β
Reply to this email directly, view it on GitHub
<#6995 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4SWMQZBLI3BUVV6ISQVLW7KKLDANCNFSM45SJMOSQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Reacted by clarence lambert
Reacted by Michael J. Ryan, Berjan B, Jakr Hung and IngΓ³lfur Valsson
The easiest way is to specify the starting directory using ~/.bashrc.
Just open Terminal and define your path:
echocd /your/start/directory >~/.bashrc
Then restart it and ejoy.
Again, that will completely break the ability to open your terminal in any other starting directory than your homedir.
So that's not a good solution. And it'll potentially also break other tools/scripts that source bashrc.
I had a similar problem.
I went to the settings.json file et it appears that the good and available Ubuntu had the parameter "hidden: true,".
I just turned it to false and everything went fine.
Activity
SGrima1 commentedon May 26, 2021
cggonzal commentedon May 27, 2021
similar problem on 18.04:

cggonzal commentedon May 27, 2021
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot.
hi7ee5h commentedon May 27, 2021
Just to reiterate, I was having the same issue. This is specific to terminal right now. Running just
wsl.exeon powershell works fine and ticking the "Use parent process directory" box in terminal settings seems to have fixed it for me too.seapagan commentedon May 27, 2021
Perfect, just had the same issue and the above worked for me - either run in cmd prompt or tick the above setting. Lifesaver!!
I have several WSL distributions, need to tick this for all of them if using Windows Terminal. Must have been some sneaky stealth update last night?
Edit again: This seems to happen if you have a custom startup directory - I did since I don't want to start my Linux in the windows %USERPROFILE% every time. However, If I tick the box, then untick and set the "\\wsl$\Ubuntu\blahblah\home" path to my home directory manually again it all works as before, and I start up in the correct (Linux) home dir.
pradoz commentedon May 27, 2021
Thanks. This worked for me.
I added a few lines to my .zshrc/.bashrc that references my %USERPROFILE% variable. If we end up there, navigate to where we want the default to be instead. Replace ~ with your desired start directory.
mhbig commentedon May 28, 2021
I had the same problem.
It seems that the directory path notation has changed from slash to backslash.
Before:
//wsl$/linux-distro/home/userAfter:
\\wsl$\linux-distro\home\userfreekvh commentedon May 28, 2021
I had the same issue, ticking "Use parent process directory" indeed fixes the described error but starts my shell in
/mnt/c/WINDOWS/system32which I don't like. Manually setting it to://wsl$/Ubuntu-20.04/home/linuxUsernameSets the start dir to my Linux user's home dir
~/as it should be.mohlatif227 commentedon May 28, 2021
Thanks a lot, it did work for me.
nikoandpiko commentedon May 28, 2021
Worked for me, but it started me on System32. Went back into settings and unchecked "User parent process directory". Loaded another tab and it is back to working normally as it did previously with the correct profile loaded.
ssaroshhasan commentedon May 28, 2021
Just go to Windows Terminal>Settings>Ubuntu and replace the starting directory field with Z:\home\username (replace Z: with whatever drive your WSL is mapped on and username with the relevant username/folder name).
jespadas commentedon May 29, 2021
This one works for me, better to start at home directory.
alecthegeek commentedon May 29, 2021
I ticked "Use parent process directory" but left command line as
wsl.exe ~ -d Debianand no further changes were required.Thanks for the info
bn-l commentedon May 29, 2021
Just adding another voice here. Had the same problem and this worked for me.
127 remaining items
DHowett commentedon Dec 8, 2022
Happy to help! Let me make sure that we don't have the version in our documentation that is busted. π
darkvertex commentedon Dec 8, 2022
Something else I've noticed when using OSC9 codes is if I was on a WSL shell and ssh somewhere where I've configured my PS to use OSC9 also, is that when I kill Windows Terminal and it comes back, it remembers and it tries to cd into the path that only existed remotely, and so it errors.
I guess I need to disable OSC9 on remote shells on my setup. π€
DHowett commentedon Dec 16, 2022
Igor Nikiforov (@Kolobamanacas) thanks again for pointing this one out; I fixed our documentation up in MicrosoftDocs/terminal#623 π
Alan Fregtman (@darkvertex) Alas, that's one of the worst parts of this whole "working directory" thing. I wish we could restore remote working directories!
douglasg14b commentedon Feb 19, 2023
Yeha, startup directory works till you actually want to access the non-wsl filesystem,
\\\\wsl$\\Ubuntu-22.04\\mntworks but\\\\wsl$\\Ubuntu-22.04\\mnt\\ccauses it to crash with[process exited with code 4294967295 (0xffffffff)]No suggestions actually seem to work here, or anywhere.
There are so many threads, and no one in any of them has a solid answer to how to change the startup directory. Just piles of "try this" changes that don't actually work.
The docs should really be covering this.
oniubi commentedon Apr 3, 2023
I also encountered the same problem. How did you finally solve it?
digininja commentedon Apr 3, 2023
Remove startingDirectory from Ubuntu WSL profile
AlexMAS commentedon Aug 22, 2023
The easiest way is to specify the starting directory using
~/.bashrc.Just open Terminal and define your path:
Then restart it and ejoy.
BtbN commentedon Aug 22, 2023
Again, that will completely break the ability to open your terminal in any other starting directory than your homedir.
So that's not a good solution. And it'll potentially also break other tools/scripts that source bashrc.
RedBaron1918 commentedon Nov 3, 2023
i found one way to change starting directory for Ubuntu. first open Json file in settings, and then add this line:
"commandline": "wsl.exe --cd C:/Users/yourProfile -d Ubuntu-22.04"BtbN commentedon Dec 1, 2023
Doesn't that again break the ability to "Open Terminal here" from the context menu of directories?
Gab01230 commentedon Jul 9, 2024
I had a similar problem.
I went to the settings.json file et it appears that the good and available Ubuntu had the parameter "hidden: true,".
I just turned it to false and everything went fine.
RollsChris commentedon Dec 10, 2024
Hi, I'm trying to split pane in windows terminal from my WSL Ubuntu, and I'm getting:
Only happens when trying to split pane.
Anybody have any ideas?
Thans
DanielAtCosmicDNA commentedon Jun 20, 2025
Christopher Rollings (@RollsChris) , here is what worked for me:
in .zshrc:
In Windows Terminal settings, configured these attributes as:
{ "commandline": "wsl.exe -d Debian", "startingDirectory": "~", }DHowett commentedon Sep 17, 2026
(I have reported Vectle (@VectleAgent) and would encourage anybody else who they have spammed to do the same thing.)