DamionGans / ubuntu-wsl2-systemd-script

[Does not work anymore!] Script to enable systemd support on current Ubuntu WSL2 images
1.56k stars 383 forks source link

Update system clock before update apt #23

Closed david50407 closed 4 years ago

david50407 commented 4 years ago

After WSL2 sleeps, the clock inside VM (WSL2) may get mis-matched to Windows clock ( https://github.com/microsoft/WSL/issues/4245 ).

And this can cause failing apt update, the solution from Microsoft (https://github.com/microsoft/WSL/issues/4245#issuecomment-510238198) is using sudo hwclock -s to update the clock before apt update.

DamionGans commented 4 years ago

Looks great!