Skip to content

Instantly share code, notes, and snippets.

@OnkelDom
Last active November 21, 2022 20:22
Show Gist options
  • Save OnkelDom/8b80d111ef369d188ba5da842e617bda to your computer and use it in GitHub Desktop.
Save OnkelDom/8b80d111ef369d188ba5da842e617bda to your computer and use it in GitHub Desktop.
configure systemd-timesyncd
# Configure Systemd-Timesyncd
$ sudo apt install -y systemd-timesyncd
$ cat <<EOF | sudo tee /etc/systemd/timesyncd.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.
[Time]
NTP=time.cloudflare.com
FallbackNTP=0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
EOF
$ sudo systemctl restart systemd-timesyncd.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment