0

I'm frequently re-installing my wsl2 Debian environment by calling powershell:

wsl --terminate Debian 
wsl --unregister Debian
wsl --install Debian

The last command blocks next commands execution with prompt:

Launching Debian GNU/Linux...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:

My goal is to have the username and password configured automatically without the need of typing them every time, so the whole re-installation will be fully automatic.

Can you suggest a solution?

Max Shlain
  • 67
  • 1
  • 6
  • You can try putting the credentials you need in a file and then [redirecting the standard input](https://stackoverflow.com/questions/11447598/redirecting-standard-input-output-in-windows-powershell) somehow – apokryfos Jun 05 '23 at 07:47

0 Answers0