Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why ubuntu.exe command redirects me to "~" directory and how can I fix it? #2587

Closed
carpet92 opened this issue Oct 22, 2017 · 13 comments
Closed
Labels

Comments

@carpet92
Copy link

carpet92 commented Oct 22, 2017

  • Your Windows build number: Windows 10 Version: 1709 Build: 16299.19

When I open windows cmd in "this" directory and run bash command it opens WSL in "this" directory where I open cmd. But when I runnnig ubuntu command it opens WSL in Ubuntu home "~" directory.

I record a Gif to demonstration:

wsl-2

How can I fix this?

@carpet92 carpet92 changed the title Why ubuntu.exe command redirects me to "~" directory and how can I fix it Why ubuntu.exe command redirects me to "~" directory and how can I fix it? Oct 22, 2017
@onomatopellan
Copy link

It's weird because ubuntu run bash works.

@carpet92
Copy link
Author

carpet92 commented Oct 22, 2017

@onomatopellan could you reproduce this issue on your PC?

@onomatopellan
Copy link

Yes. Typing ubuntu goes to /home/user folder. But typing ubuntu run bash goes to the directory from it's called.

@carpet92
Copy link
Author

@onomatopellan ubuntu run bash runs bash not ubuntu. chsh works correctly only with ubuntu.exe.

@onomatopellan
Copy link

@Zx-EvM ubuntu run bash runs bash inside ubuntu distro. Try ubuntu run chsh then.

@onomatopellan
Copy link

@Zx-EvM You should read this https://msdn.microsoft.com/en-us/commandline/wsl/wsl-config
Even if you have multiple distros installed bash will open the default one that is listed with wslconfig.exe /l

@carpet92
Copy link
Author

@onomatopellan

wsl-4

and wslconfig.exe /l output:

Windows Subsystem for Linux Distributions:
Ubuntu (Default)

@onomatopellan
Copy link

@Zx-EvM what says if you try wsl.exe instead of bash.exe

@carpet92
Copy link
Author

carpet92 commented Oct 22, 2017

@onomatopellan it will run zsh. Thus looks like it runs ubuntu.

@onomatopellan
Copy link

it's a duplicate of #2570
The team tagged it as a launcher bug.

@carpet92
Copy link
Author

carpet92 commented Oct 22, 2017

@onomatopellan thanks. Your this #2587 (comment) comment is helps for me. We can just set "WSL OS" as default and run it with "special default WSL OS runner - wsl.exe".

@MikeGitb
Copy link

Just want to add my +1 to this bug. That behavior is really annoying and while setting the default distro works, it doesn't help if you want to use multiple different distros at the same time.

@benhillis
Copy link
Member

Duplicate of #2385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants