ernu.blogg.se

Wsl windows terminal starting directory
Wsl windows terminal starting directory




wsl windows terminal starting directory

So the first instance wont start in ~, but the others will start in ~ because the first instance initialized the //wsl$/ folder". In Settings it does still say, and always has: //wsl$/Ubuntu-20.04/home/Įdit2: I found a comment #592 (comment) that says the "//wsl$/ folder is not initialized until a wsl instance is started. mine is 18.04 and you are there (Better to use 20. It seemed to have been fixed when I tried closing and reopening Windows Terminal, but when running Terminal at system boot or after a long delay between closing and reopening, it STILL starts up in /mnt/c/Users/ instead of ~. When you open Windows Terminal, it usually starts with a default starting directory path to your user account folder on your computer. Hit CTRL + SHIFT + P and type WSL, then select Reopen Folder in WSL: Then select your distro, e.g.

wsl windows terminal starting directory

From PowerShell, the command get-date will provide the date from the Windows file system and wsl date will provide the date from the Linux file system. It is now fixed after chmod go+rx ~ and WSL starts up in my Linux home directory again.Įdit: NOPE. Replacing command with a WSL command, such as: wsl -l -v to list installed distributions or wsl pwd to see where the current directory path is mounted in wsl. I always do chmod -R go-rwx ~ and that bit me here.

Setting a default starting directory The last thing that is worth mentioning on this article, is that, by default, when opening the terminal it starts the shell on mnt/c/Users/.

Strange, because the root user should have access anyway, right? Save the file, restart your terminal and you will see that it will open your WSL shell instead of the Windows Powershell.

wsl windows terminal starting directory

Reading every message here FINALLY gave me the hint #2743 (comment) why it wasn't working for me: the home directory needs to have read/execute access for group/others.






Wsl windows terminal starting directory