Wednesday, July 3, 2019

Gaining Root Access on Windows Subsystem for Linux

Recently I corrupted my /etc/sudoers file in bash on Windows Subsystem for Linux (WSL). I was unable to fix the file from the bash prompt because the corrupted file prevented me from running anything with elevated privileges. I found the commands below from this post.

wsl -u root
# nano /etc/sudoers