2 answers
By default modern Ubuntu versions run the service systemd-timesyncd
in the background. It fetches the time at regular intervals and should automatically set your system time when an NTP server is reachable.
Setting the time in Ubuntu manually
Since Ubuntu use systemd, the normal systemd procedure with timedatectl
is used.
From man timedatectl
:
set-time [TIME]
Set the system clock to the specified time. This will also update the RTC time accordingly. The time may be specified in the format "2012-10-30 18:17:16".
So, to set the time manually just run the command:
sudo timedatectl set-time "2025-01-07 18:17:16"
Setting the time automatically
I cant't find a concrete command to trigger an NTP sync, but restarting the systemd-timesyncd
service should do the trick if you don't want to wait for the automatic sync.
sudo systemctl restart systemd-timesyncd
0 comment threads
TL;DR BIOS Setup, not Operating System
In most systems there is a user-accessible setup page that is part of the BIOS. This is accessed before starting Linux, Windows or any other operating system. The process to get to the setup page varies by manufacturer. Typically it is an F-key (F1, F2, F10, F11, F12 - but could be any) or Delete or some other key pressed during the very beginning of the startup process. On some systems there will be a display showing what key to press. If not, check the manufacturer's web site for information about your particular model.
Once you are in the BIOS setup page it is usually fairly simple to set the date/time, save the changes and restart the computer. Linux (and just about any other operating system since MS/PC-DOS 3.0) will read the date/time automatically.
0 comment threads