{{ message }}

# wslpath command does not return the windows path for home directory #3146

Closed
opened this issue May 4, 2018 · 10 comments
Closed

# wslpath command does not return the windows path for home directory#3146

opened this issue May 4, 2018 · 10 comments
Labels

### mmktomato commented May 4, 2018

$wslpath -w ~ wslpath: /path/to/home: Result not representable  Is this intended behavior? I expect following result: $ wslpath -w ~
C:\Users\mkt\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\path\to\home


### env

>ver

Microsoft Windows [Version 10.0.17134.1]


### 0xbadfca11 commented May 5, 2018

 WSL team says don't modify Linux files from Windows applications. So I think that wslpath does not provide path conversion except /mnt for Windows applications interoperability. If provided, will helps modify Linux files from Windows applications.

### mmktomato commented May 9, 2018

 Ah~~~ I forgot the prerequisite. I want to run like: $AutoHotkey64.exe$(wslpath -w ~/dotfiles/ImDisable.ahk)  This is completely read only. I hope wslpath resolves paths other than /mnt.

### benhillis commented May 10, 2018

 This is by-design for now. Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot.
added the label May 10, 2018

### mmktomato commented May 11, 2018

 I see. I understand my demand is potentially dangerous.
closed this May 11, 2018

### espoelstra commented Sep 12, 2018

 You may be able to work around this using https://brianketelsen.com/going-overboard-with-wsl-metadata/ if you read the post and pay special attention to the "Update" section at the end.
mentioned this issue Oct 6, 2018

### nic-hartley commented Nov 8, 2018

 @benhillis That's what --force and a warning is for. rm --no-preserve-root -rf / doesn't say Result not representable. Sometimes you want to do "stupid" things.

### pkruk2 commented Mar 12, 2019 • edited

 @benhillis I wanted to save ssh key generated with putty into ~/.ssh. Is it safe or is it not safe as per "Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot." ? If it is safe, how can I know where is the ~/.ssh located? (from Windows perspective)

### shogerr commented May 14, 2019

 This is by-design for now. Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot. Microsoft, you are certainly hell bent on destroying everything about Linux that makes Linux Linux, aren't you? Did you consider that you don't need to hand hold people at every turn, and that maybe treating your users like incompetent children frustrates the users you are trying to attract from the Linux world more than anything?

### pkruk2 commented May 15, 2019

 There's more details about this in https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/ I think MS said they are going to lift this limitation in future Windows update.

### ivictbor commented Jul 19, 2020

 WSL team says don't modify Linux files from Windows applications. So I think that wslpath does not provide path conversion except /mnt for Windows applications interoperability. If provided, will helps modify Linux files from Windows applications. But still, this is not cool, I just want to open folder with virtualenv sources in windows, not to edit, but to open it in IDE