yuk7 / wsldl

Advanced WSL launcher / installer. (Win10 FCU x64/arm64 or later.)
https://git.io/wsldl
MIT License
1.76k stars 131 forks source link

Request: add option to run a single session as selected user #139

Open tranzystorekk opened 1 year ago

tranzystorekk commented 1 year ago

Use case: sporadically, when something breaks in my WSL, I need to do a one-time as-root run to do some fixes etc. This currently requires running wsldl config --default-user root, doing the fix and then switching back to my regular user.

It would be convenient if wsldl run had a --user flag to temporarily select a different user for a single session.

tranzystorekk commented 1 year ago

I wanted to take a stab at making a PR, but I can't find any way to select user id/name per run in the windows API. There must be some way though, since you can run wsl -u <name> 🤔