Skip to content

Commit 27745f3

Browse files
authored
Merge pull request #606 from misczak/patch-1
Added section for changing default user
2 parents de10d64 + d095603 commit 27745f3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

WSL/wsl-config.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ To reinstall, find the distribution in the Microsoft store and select "Launch".
159159

160160
Run WSL as the specified user. Please note that user must exist inside of the WSL distribution.
161161

162+
## Change the default user for a distribution
163+
164+
`<DistributionName> config --default-user <Username>`
165+
166+
Change the default user that for your distribution log-in. The user has to already exist inside the distribution in order to become the default user.
167+
168+
For example:
169+
`ubuntu config --default-user johndoe` would change the default user for the Ubuntu distribution to the "johndoe" user.
170+
171+
> [!NOTE]
172+
> If you are having trouble figuring out the name of your distribution, see [List distributions](https://docs.microsoft.com/windows/wsl/wsl-config#list-distributions) for the command to list the official name of the installed distributions.
173+
162174
## Run a specific distribution
163175

164176
`wsl -d <DistributionName>`, `wsl --distribution <DistributionName>`

0 commit comments

Comments
 (0)