| Befehl/Tool | Beschreibung | Anleitung |
| timedatectl ** systemd-basierte OS | Verwaltung der Systemzeit und Zeitzone. Aktivierung von systemd-timesyncd. | – Aktuelle Zeit anzeigen: timedatectl – Zeitzone ändern: timedatectl set-timezone Europe/Berlin – Synchronisation aktivieren: timedatectl set-ntp true |
| systemctl ** systemd-basierte OS | Steuerung des Zeitdienstes systemd-timesyncd. | – Status prüfen: systemctl status systemd-timesyncd – Starten: systemctl start systemd-timesyncd – Aktivieren: systemctl enable systemd-timesyncd |
| chronyd ** Ubuntu, Debian, RHEL, CentOS | Alternativer Zeitdienst, präzise und ressourcenschonend. | – Installation: sudo apt install chrony – Konfiguration: /etc/chrony/chrony.conf bearbeiten – Dienst starten: sudo systemctl start chronyd |
| ntpd ** Ubuntu, Debian | Klassischer Zeitdienst zur Synchronisierung mit NTP-Servern. | – Installation: sudo apt install ntp – Konfiguration: /etc/ntp.conf bearbeiten – Dienst starten: sudo systemctl start ntp |
| hwclock ** alle Linux-Distributionen | Einstellung der Hardware-Uhrzeit (BIOS). | – Uhrzeit lesen: hwclock –show – Uhrzeit setzen: hwclock –set –date=“2024-11-24 10:00:00″ – Zeit in Systemuhr schreiben: hwclock –hctosys |
| date ** alle Linux-Distributionen | Direkte Einstellung und Anzeige der Systemzeit (weniger üblich). | – Uhrzeit anzeigen: date – Uhrzeit setzen: date –set „2024-11-24 10:00:00“ |
| ntpq ** Ubuntu, Debian | Statusprüfung der NTP-Synchronisation. | – Verbundene Server anzeigen: ntpq -p |
| /etc/systemd/timesyncd.conf ** systemd-basierte OS | Konfiguration des systemd-timesyncd. | – NTP-Server eintragen: NTP=pool.ntp.org – Dienst neu starten: sudo systemctl restart systemd-timesyncd |
Ubuntu/Debian mit timedatectl
- Aktuelle Zeit prüfen:
timedatectl - Zeitzone einstellen:
sudo timedatectl set-timezone Europe/Berlin - NTP-Synchronisation aktivieren:
sudo timedatectl set-ntp true - Status prüfen:
Timedatectl
RHEL/CentOS mit chronyd
- Installation:
sudo yum install chrony - Konfiguration:
- Datei /etc/chrony.conf öffnen:
sudo nano /etc/chrony.conf - NTP-Server hinzufügen:
server pool.ntp.org iburst
- Datei /etc/chrony.conf öffnen:
- Dienst starten und aktivieren:
sudo systemctl start chronyd
sudo systemctl enable chronyd
Verwendung von ntpd auf Ubuntu
- Installation:
sudo apt install ntp - Konfiguration:
- Datei /etc/ntp.conf öffnen:
sudo nano /etc/ntp.conf - NTP-Server hinzufügen:
server pool.ntp.org
- Datei /etc/ntp.conf öffnen:
- Dienst starten:
sudo systemctl start ntp
Hardware-Uhr synchronisieren
- Zeit von Systemuhr zur Hardware-Uhr synchronisieren:
sudo hwclock –systohc - Hardware-Uhrzeit anzeigen:
hwclock –show

