Skip to content

Instantly share code, notes, and snippets.

@freemanirl
Created February 21, 2024 17:38
Show Gist options
  • Save freemanirl/3d09b661dfcd29486b6be513b96d6eac to your computer and use it in GitHub Desktop.
Save freemanirl/3d09b661dfcd29486b6be513b96d6eac to your computer and use it in GitHub Desktop.
Fix your ntp sync in wsl2
#!/usr/bin/bash
sudo mkdir /etc/systemd/system/systemd-timesyncd.service.d
cat <<EOF | sudo tee /etc/systemd/system/systemd-timesyncd.service.d/clear-condition-virtualization.conf\n[Unit]\nConditionVirtualization=\nEOF
sudo systemctl daemon-reload
sudo timedatectl set-ntp yes
timedatectl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment