In WSL2 Console, create /etc/wsl.conf with this contents: 1[user] 2default=username Then in powershell (administrator): 1wsl --shutdown Reopen terminal and make sure default user is now changed. Reference: https://superuser.com/questions/1566022/how-to-set-default-user-for-manually-installed-wsl-distro
Read MoreSometimes, you need to check the uptime of a Windows machine. Here's the Powershell command for that: 1PS C:\> systeminfo|find "System Boot Time" This was tested working under Windows 10 Pro and worth noting that it also works in the old cmd. For other methods, see this article.
Read MoreLinux systemcmd or init way of rebooting will not work in a Windows Subsystem for Linux or wsl-run Linux. You need to use the Powershell command below: 1wsl --shutdown For other methods, see this article.
Read MoreIf you see garbage characters instead of the expected non-English language, fix is easy. Install corresponding language pack (Japanese in this case) https://support.microsoft.com/en-us/windows/language-packs-for-windows-a5094319-a92d-18de-5b53-1cfc697cfca8 Set the locale for non-unicode programs. See …
Read More1PS C:\> [Environment]::Is64BitProcess 2PS C:\> [Environment]::Is64BitOperatingSystem both will return "True" if you're on a 64 bit Windows. See https://stackoverflow.com/questions/31977657/determining-32-64-bit-in-powershell
Read More