Created
February 21, 2024 17:38
-
-
Save freemanirl/3d09b661dfcd29486b6be513b96d6eac to your computer and use it in GitHub Desktop.
Fix your ntp sync in wsl2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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