| Command/Tool | Description | Instructions |
| timedatectl ** systemd-based OS | Management of system time and time zone. Enable systemd-timesyncd. | – Show current time: timedatectl – Change time zone: timedatectl set-timezone Europe/Berlin – Activate synchronization: timedatectl set-ntp true |
| systemctl ** systemd-based OS | Control of the time service systemd-timesyncd. | – Check status: systemctl status systemd-timesyncd – Start: systemctl start systemd-timesyncd – Enable: systemctl enable systemd-timesyncd |
| chronyd ** Ubuntu, Debian, RHEL, CentOS | Alternative time service, precise and resource-saving. | – Installation: sudo apt install chrony – Configuration: /etc/chrony/chrony.conf edit – Start service: sudo systemctl start chronyd |
| ntpd ** Ubuntu, Debian | Classic time service for synchronization with NTP servers. | – Installation: sudo apt install ntp – Configuration: /etc/ntp.conf edit – Start service: sudo systemctl start ntp |
| hwclock ** AllLinux distributions | Setting the hardware time (BIOS). | – Read time: hwclock –show – Set time: hwclock –set –date=”2024-11-24 10:00:00″ – Write time to system clock: hwclock –hctosys |
| Date ** AllLinux distributions | Direct setting and display of the system time (less common). | – Show time: date – Set time: date –set “2024-11-24 10:00:00” |
| ntpq ** Ubuntu, Debian | NTP synchronization status check. | – View Connected Servers: ntpq -p |
| /etc/systemd/timesyncd.conf ** systemd-based OS | Configuration of the systemd-timesyncd. | – Enter NTP server: NTP=pool.ntp.org – Restart service: sudo systemctl restart systemd-timesyncd |
Ubuntu/Debian with timedatectl
- Check current time:
timedatectl - Set time zone:
sudo timedatectl set-timezone Europe/Berlin - To enable NTP synchronization:
sudo timedatectl set-ntp true - Check status:
Timedatectl
RHEL/CentOS with chronyd
- Installation:
sudo yum install chrony - Configuration:
- Open file /etc/chrony.conf:
sudo nano /etc/chrony.conf - To add NTP servers:
Server pool.ntp.org iburst
- Open file /etc/chrony.conf:
- Start and activate the service:
sudo systemctl start chronyd
sudo systemctl enable chronyd
How to Use ntpd on Ubuntu
- Installation:
sudo apt install ntp - Configuration:
- Open the /etc/ntp.conf file:
sudo nano /etc/ntp.conf - To add NTP servers:
Server pool.ntp.org
- Open the /etc/ntp.conf file:
- Start service:
sudo systemctl start ntp
Synchronize hardware clock
- Synchronize time from system clock to hardware clock:
sudo hwclock –systohc - Display hardware time:
hwclock –show

