After a computer restart, newly installed Ubuntu Subsystem on Windows 10 showed me
Access is denied.
Press any key to continue...
Is there any solutions?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communitySee github issue answer for resolution. https://github.com/microsoft/WSL/issues/4920#issuecomment-658808564
This happens when WSL shuts down automatically and you need to start it back with Admin privileges. Open Powershell / CMD as admin and run wsl
. WSL will start and you can close the window. The normal way of using WSL will now work.
Alternatively, try running Ubuntu WSL as admin (right click on Ubuntu in Start and click Run as Administrator). Post initial WSL launch, you can open it without Admin.
Disable compress and encryption for this folder
%USERPROFILE%\AppData\Local\Packages\{distribution_folder}
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\{distribution_folder}
Mar 17, 2021 at 21:18
This is an old question and faced a different issue but there's a newer problem with WSL that will also cause the "Access is denied" error as well when you launch WSL from an elevated shell (cmd/PoSH/etc). Try running the shell as a standard user (don't use "run as administrator", ensure that "administrator" is not in the window name).
There's an open bug report for this with several workarounds (including the above): https://github.com/microsoft/WSL/issues/4920
ubuntu
in cmd? What happens when you launch it from Windows Store? Did you start WSL after the installation i.e. before restarting the system?