====== [Linux] Configurar la hora ====== ===== Sincronizar hora con NTP o systemd‑timesyncd en Debian 13 ===== Falta verificar esta página Para sincronizar la hora con NTP en Debian 13 lo habitual es usar **systemd‑timesyncd** a través de `timedatectl`, o bien instalar un demonio NTP completo como `ntp`/`chrony` si necesitas más opciones. **Comprobar estado actual** * Ver estado de hora, NTP y zona horaria: timedatectl status En la salida revisa: - System clock synchronized: debería ser ''yes''. - NTP service: debería decir ''active'' si se usa systemd‑timesyncd u otro cliente NTP integrado. **Usar systemd‑timesyncd** Debian moderno suele integrar `systemd‑timesyncd` como cliente SNTP ligero, pero puede no venir instalado o habilitado por defecto. - Instalar (si no existe): # apt update # apt install systemd-timesyncd - Habilitar y arrancar: # systemctl enable --now systemd-timesyncd.service - Activar la sincronización NTP en systemd: # timedatectl set-ntp true - Verificar: # timedatectl status # systemctl status systemd-timesyncd.service Si el servicio aparece como ''active (running)'' y ''NTP service: active'', el reloj se sincroniza con servidores NTP configurados en ''systemd‑timesyncd''. **Configurar servidores NTP en systemd‑timesyncd** - Editar el archivo de configuración: # nano /etc/systemd/timesyncd.conf - En la sección ''[Time]'', define tus servidores: ini [Time] NTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org FallbackNTP=2.debian.pool.ntp.org 3.debian.pool.ntp.org - Aplicar cambios: # systemctl restart systemd-timesyncd.service # timedatectl status En entornos con servidor NTP interno pon la IP o nombre de ese servidor en `NTP=` y deja `FallbackNTP` con servidores públicos. **Usar un demonio NTP completo (ntp o chrony)** * Si necesitas más precisión, estadísticas o servir tiempo a otros equipos, conviene instalar un cliente/servidor NTP completo. - Instalar `ntp` (ejemplo): # apt update # apt install ntp O bien ''chrony'': # apt install chrony - Desactivar la sincronización de systemd‑timesyncd para evitar conflictos: # timedatectl set-ntp false # systemctl disable --now systemd-timesyncd.service - Configurar servidores en: - ''/etc/ntp.conf'' para ''ntp''. - ''/etc/chrony/chrony.conf'' para ''chrony''. - Después reinicia el servicio correspondiente: # systemctl restart ntp o # systemctl restart chrony ''ntp'' y ''chrony'' proporcionan más opciones de ajuste fino, pero para la mayoría de escritorios y servidores simples basta con systemd‑timesyncd. **Forzar y verificar sincronización** - Forzar actualización rápida (útil después de cambiar servidores): - Con systemd‑timesyncd, lo normal es esperar unos minutos; si la hora está muy desfasada, puedes ajustarla una vez: # timedatectl set-time "2025-12-19 10:44:00" y dejar que NTP haga los ajustes finos posteriores. - Comprobar otra vez: timedatectl status Cuando el campo `System clock synchronized` pase a `yes` y el desajuste sea mínimo, la sincronización está funcionando correctamente. **Enlaces** - [[https://guidocutipa.blog.bo/como-sincronizar-la-hora-en-ubuntu-debian-con-un-servidor-ntp/|Cómo sincronizar la hora en Ubuntu/Debian usando systemd-timesyncd]] - [[https://translate.google.com/translate?u=https%3A%2F%2Fphoenixnap.com%2Fkb%2Fdebian-time-sync&hl=es&sl=en&tl=es&client=srp|How to Set Up Time Synchronization on Debian]] - [[https://translate.google.com/translate?u=https%3A%2F%2Fwiki.debian.org%2FDateTime&hl=es&sl=en&tl=es&client=srp|DateTime]] - [[https://www.reddit.com/r/debian/comments/1e4k61a/needed_to_install_ntp_to_synchronize_the_time/|Needed to install NTP to synchronize the time]] - [[https://instructorbenyblanco.wordpress.com/2020/06/02/hora-linux-systemd/|Controle la hora y fecha de su computadora con systemd]] - [[https://translate.google.com/translate?u=https%3A%2F%2Fwiki.debian.org%2FNTP&hl=es&sl=en&tl=es&client=srp|Debian NTP]] - [[https://translate.google.com/translate?u=https%3A%2F%2Fwiki.archlinux.org%2Ftitle%2FSystemd-timesyncd&hl=es&sl=en&tl=es&client=srp|systemd-timesyncd]] - [[https://translate.google.com/translate?u=https%3A%2F%2Fserverfault.com%2Fquestions%2F948974%2Fforce-systemd-timesyncd-to-sync-time-with-ntp-server-immediately&hl=es&sl=en&tl=es&client=srp|Force systemd timesyncd to sync time with NTP server immediately]] **Vídeos** - [[https://www.youtube.com/watch?v=IOCoG8VX_dE|Solucion Sincronizar El Reloj En Debian / Ubuntu | Zona Horaria / Hora Y Fecha Linux]] \\