Mind Flow Productions

Systems & Productivity

For some tasks in linux on Windows, sudo is not sufficient. These instructions are for getting root access in Linux that is setup on WSL.

1 Open a Windows CMD console as administrator: Windows+R to open the Run box. Type ‘cmd’ and then press Ctrl+Shift+Enter to run as admin.

2 Set the default Linux user to root from Windows CMD console: C:> ubuntu config —default-user root

3 Launch your Linux console (ubuntu). You will automatically login as root.

4 Do what you need to do as root.

5 Go back to Windows CMD console and reset your default user back to your normal Linux user account. C:> ubuntu config —default-user username

  devops