How To solve Failed to set time: Automatic time synchronization is enabled – Linux Tips And Tricks

How To solve Failed to set time: Automatic time synchronization is enabled – Linux Tips And Tricks

HomeOther ContentHow To solve Failed to set time: Automatic time synchronization is enabled – Linux Tips And Tricks
ChannelPublish DateThumbnail & View CountActions
Channel Avatar Rabi Gurung2023-02-01 16:12:12 Thumbnail
4,188 Views
Learn how to resolve the error message while setting date and time.

/”Failed to set time: Automatic time synchronization is enabled/”.

The error message /”Failed to set time: Automatic time synchronization is enabled/” indicates that the system is configured to automatically synchronize its clock with a remote time server, and therefore, the user is not allowed to manually set the time using the timedatectl set-time command. The automatic time synchronization must be disabled before the user can set the time manually. This can be done using the command timedatectl set-ntp off.

The command timedatectl set-time (as shown below) is used to set the system clock time and date in a Linux system that uses the Systemd system and service manager. It allows the user to set the current date and time of the system, which is stored in the hardware clock and used as the system time. But if an NTP servicee is running you wil not be able to change the linux system time.

sudo timedatectl set-time 2033-11-10

The command timedatectl will show you the Linux system time service status.

timedatectl

The following command will disabled the NTP service from your Linux machine.

sudo timedatectl set-ntp false

After that you can runt the following command again to change the Linux System time. this time round you will be able to change the Linux system time successfully.

sudo timedatectl set-time 2033-11-10

To enable the NTP service again, simple run the command shown below.
sudo timedatectl set-ntp true

#linux #ubuntu #redhat #bash #ntp #timedatectl #clock #datetime

Please take the opportunity to connect and share this video with your friends and family if you find it useful.