
To login you need to run:
wsl -d 
Notice in the above image that the logged in user is a root account. So let's setup a normal user account.
First, while logged in to the second instance of Ubuntu in WSL2 as root, run the below command, replace with the username of your choice:
NEW_USER= Then, run the following command to create the user account and set the password:
useradd -m -G sudo -s /bin/bash "$NEW_USER" passwd "$NEW_USER" 
Next, we need to configure Ubuntu to log in as your new user by default instead of root.
To do so, run the below command: paste the entire block of code below into your teminal and press enter.
tee /etc/wsl.conf <<_EOF [user] default=${NEW_USER} _EOF 
First, exit the WSL by running logout, then shutfown the second Ubuntu by running
wsl --terminate Finally, login to the second instance of Ubuntu again:
wsl -d 
Need Help? Open a discussion thread on GitHub.
How to install multiple instances of Ubuntu in WSL2