NTP und Zeitsynchronisierungsdienste
Halten Sie Linux-Uhren mit NTP, chrony und timedatectl korrekt und verstehen Sie, warum synchronisierte Zeit für vernetzte Dienste entscheidend ist.
NTP und Zeitsynchronisierungsdienste ist eine kostenlose Linux Networking & TCP/IP for Developers-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Networking & TCP/IP for Developers-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Why Time Matters
Accurate clocks are essential for networked systems. Logs, TLS certificates, authentication tokens, and distributed databases all break when clocks drift apart. The Network Time Protocol (NTP) keeps them aligned.
How NTP Works
NTP clients query time servers, measure the network round-trip, and gradually adjust the local clock. It corrects for delay so even over the internet machines stay within milliseconds.
Stratum Levels
NTP servers are ranked by stratum. Stratum 0 is a reference clock (like GPS), stratum 1 servers connect directly to it, and each layer below is one step further. Lower stratum means closer to the source.
Checking Time Status
The simplest check is timedatectl, which shows the current time, timezone, and whether NTP synchronization is active.
timedatectl statusEnabling NTP
Turn on automatic synchronization with one command. The system then keeps the clock in sync in the background.
sudo timedatectl set-ntp trueMeet chrony
chrony is the modern NTP implementation used by most Linux distributions. It handles intermittent connections and large time jumps better than the older ntpd.
sudo systemctl status chronydViewing Sources
List the time servers chrony is using and how it rates them with chronyc sources. The asterisk marks the currently selected source.
chronyc sources -vMeasuring Accuracy
chronyc tracking shows how far off the clock is and how it is being corrected, including the estimated offset from true time.
chronyc trackingConfiguring Servers
Edit /etc/chrony/chrony.conf to point at preferred pools or internal time servers, then restart the service. Many setups use the public NTP pool.
pool pool.ntp.org iburstTimezone vs Clock
Time synchronization sets the absolute moment (UTC), while the timezone affects how it is displayed. Set the zone separately and keep the hardware clock in UTC.
sudo timedatectl set-timezone Europe/IstanbulForcing a Sync
After a long downtime the clock may be far off. chronyc makestep forces an immediate correction instead of slowly slewing, useful right after boot.
sudo chronyc makestepQuick Check
Test your NTP knowledge.
Recap
You learned to manage time synchronization.
- NTP keeps clocks aligned, which is critical for logs, TLS, and auth.
- Use
timedatectlto check and enable sync; chrony is the modern daemon. chronyc sourcesandtrackingshow servers and accuracy.
Häufig gestellte Fragen
Ist die Lektion „NTP und Zeitsynchronisierungsdienste“ kostenlos?
Ja — der vollständige Text von „NTP und Zeitsynchronisierungsdienste“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Networking & TCP/IP for Developers-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „NTP und Zeitsynchronisierungsdienste“?
Halten Sie Linux-Uhren mit NTP, chrony und timedatectl korrekt und verstehen Sie, warum synchronisierte Zeit für vernetzte Dienste entscheidend ist. Du übst Linux Networking & TCP/IP for Developers mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Linux Networking & TCP/IP for Developers zu starten?
Keine Vorkenntnisse erforderlich. Linux Networking & TCP/IP for Developers auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.
Wie lange dauert die Lektion „NTP und Zeitsynchronisierungsdienste“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Linux Networking & TCP/IP for Developers-Lektion Code schreiben und ausführen?
Ja. Jede Linux Networking & TCP/IP for Developers-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- SSH für sicheren Fernzugriff
- HTTP/HTTPS-Webdienste
- DHCP- und DNS-Dienste
- NTP und Zeitsynchronisierungsdienste