NTP y servicios de sincronización horaria
Mantenga precisos los relojes de Linux con NTP mediante chrony y timedatectl, y comprenda por qué la hora sincronizada es fundamental para los servicios conectados en red.
NTP y servicios de sincronización horaria es una lección gratuita de Linux Networking & TCP/IP for Developers en CoddyKit. Esta es la lección 4 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Linux Networking & TCP/IP for Developers, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Linux Networking & TCP/IP for Developers incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
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.
Aprende Linux Networking & TCP/IP for Developers con un tutor de IA — gratis
Escribe y ejecuta código real en tu navegador, obtén ayuda instantánea de un tutor de IA disponible 24/7 y continúa donde lo dejaste en la web o en la aplicación.
- Cursos
- 12
- Lecciones
- 48
Preguntas frecuentes
¿La lección «NTP y servicios de sincronización horaria» es gratis?
Sí — el texto completo de «NTP y servicios de sincronización horaria» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Linux Networking & TCP/IP for Developers, actualiza a CoddyKit PRO. El curso de Linux Networking & TCP/IP for Developers incluye 4 lecciones en total.
¿Qué aprenderé en «NTP y servicios de sincronización horaria»?
Mantenga precisos los relojes de Linux con NTP mediante chrony y timedatectl, y comprenda por qué la hora sincronizada es fundamental para los servicios conectados en red. Practicas Linux Networking & TCP/IP for Developers con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Linux Networking & TCP/IP for Developers?
No se requiere experiencia previa. Linux Networking & TCP/IP for Developers en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 4 de 4.
¿Cuánto tiempo toma la lección «NTP y servicios de sincronización horaria»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Linux Networking & TCP/IP for Developers?
Sí. Cada lección de Linux Networking & TCP/IP for Developers incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- SSH para acceso remoto seguro
- Servicios web HTTP/HTTPS
- Servicios DHCP y DNS
- NTP y servicios de sincronización horaria