Introduction#
Setting the correct timezone ensures logs, schedules, and timestamps are accurate.
This guide shows how to set the timezone to Europe/London and configure NTP on Ubuntu.
Check Current Time Settings#
timedatectl status
Set the Timezone#
Set the timezone with:
sudo timedatectl set-timezone Europe/London
Verify the Timezone Change#
Confirm the change:
timedatectl status
The output should indicate that the timezone is set to Europe/London.
NTP Time Configuration#
Ubuntu 26.04 (Chrony)#
Create a custom source file:
sudo nano /etc/chrony/sources.d/custom.sources
Add pool servers:
pool 0.pool.ntp.org iburst
pool 1.pool.ntp.org iburst
pool 2.pool.ntp.org iburst
pool 3.pool.ntp.org iburst
Verify the main Chrony config includes sourcedir /etc/chrony/sources.d:
grep "sourcedir" /etc/chrony/chrony.conf
If it returns nothing, add this line to the end of /etc/chrony/chrony.conf:
sourcedir /etc/chrony/sources.d
Bring Chrony online and restart it:
sudo chronyc online
sudo systemctl restart chrony
Check Chrony sources:
chronyc sources -v
Enable NTP:
sudo timedatectl set-ntp true
This method is useful because custom source files are easier to maintain and are less likely to be overwritten by package updates.
Ubuntu 24.04 (systemd-timesyncd)#
Edit the configuration file:
sudo nano /etc/systemd/timesyncd.conf
Under the [Time] section, add:
NTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
Then enable NTP:
sudo timedatectl set-ntp true
Example Output#
Example timedatectl status output:
Local time: Wed 2025-03-12 21:24:32 GMT
Universal time: Wed 2025-03-12 21:24:32 UTC
RTC time: Wed 2025-03-12 21:24:32
Time zone: Europe/London (GMT, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
If everything is working correctly, the timezone should be set to Europe/London.
Conclusion#
You have now set the system timezone and configured NTP synchronization on Ubuntu. Verify time synchronization after making changes, especially on servers and systems that rely on accurate logs.