LxRun Issue in Windows 10 Bash Shell

Published | Go Back

I’ve just found a workaround for an is­sue of set­ting the de­fault user in Windows 10 Bash shell.

During in­stal­la­tion of Windows 10 Bash shell, there is a step to set or cre­ate the de­fault user. It’s equiv­a­lent to ex­e­cut­ing the fol­low­ing com­mand:

LxRun.exe /setdefaultuser <username>

If the Temp folder is not ac­ces­si­ble, ei­ther be­cause of priv­i­lege or un­sup­ported file sys­tems like RAM disk, an er­ror mes­sage will ap­pear:

/bin/bash: /mnt/d/TEMP/uid.txt: No such file or directory

Or

/bin/bash: /mnt/c/WINDOWS/TEMP/uid.txt: No such file or directory

The first er­ror mes­sage ap­pears when my Temp folder is on a RAM disk, and the sec­ond ap­pears when I’m us­ing the sys­tem-level Temp folder (C:\Windows\Temp).

The workaround is fairly sim­ple. Just move the Temp folder to some­where ac­ces­si­ble, such as %USERPROFILE%\AppData\Local\Temp.

By the way, I’ve sub­mit­ted an is­sue for this on GitHub.