0

We are creating a deployment for WSL/Ubuntu 20.04. This works flawlessly for virgin machines.

However, we have a population of machines which have Ubuntu 16.04 which we want to update. We're not in the least concerned about any user-level data, as WSL is used simply as a tool for loading structural models.

Here's the CMD we run on the target machines:

wsl --terminate Ubuntu-16.04
wsl --unregister Ubuntu-16.04
wsl --unregister Ubuntu-20.04
powershell Add-AppxPackage -Path '[path_to_AppX]\Ubuntu_2004.2021.825.0_x64.appx'
ubuntu --install --root

After installing, that last command causes the distro to prompt for the creation of a default UNIX account. It does NOT do this on virgin machines. It simply exits.

Giacomo1968
  • 55,001
VBScab
  • 1
  • So what version of WSL do you have installed? The one installed through the Optional Windows Feature or the Windows Store? You can do one of two things, use config --default-user root to specify you want to use root or use /etc/wsl.conf to specify the default user. Your command attempts to specify root as the user but I don't believe that syntax is current or accurate. The would suggest your syntax is wrong. – Ramhound Dec 14 '23 at 19:40
  • Did you include the full cmd? You normally specify a path where it ends, like --root "c:\custom\folder". – Cpt.Whale Dec 14 '23 at 19:59

1 Answers1

0

There was some inconsistency. The command isn't:

ubuntu --install --root

but

ubuntu install --root
Ramhound
  • 42,708
VBScab
  • 1