0

Is there a way to access Windows file with administrative rights using WSL?

sudo vi /mnt/c/Users/a/admin/file.txt
1

Is there a way to access Windows file with administrative rights using WSL?

Yes; All that is required in order to do so is to have elevated the command prompt that launched the WSL instance.

A Bash session with Windows admin privileges may access cd /mnt/c/Users/Administrator while a Bash session without admin privileges would see a "Permission Denied" error.

Microsoft describes the permissions within a WSL instance as the following:

enter image description here

Source: User Accounts and Permissions for Windows Subsystem for Linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.