How to use timedatectl disable ntp time sync?

Is it possible to disable ntp time sync with help of timedatectl command? The syntax is not clear and I am unable to find disable option. Can you help?

Use the set-ntp BOOL option to enable or disable network time synchronization using the timedatectl on Linux with systemd as init.

Disabling ntp ( time synchronization )

The command is as follows to turn it off your NTP:

timedatectl set-ntp false
## OR ##
timedatectl set-ntp 0

Enabling ntp ( time synchronization )

Turn it on again:

timedatectl set-ntp true
## OR ##
timedatectl set-ntp 1

Verifying current time settings

Again, run:

timedatectl status

Here is what you will see

               Local time: Fri 2022-09-02 09:50:03 IST
           Universal time: Fri 2022-09-02 04:20:03 UTC
                 RTC time: Fri 2022-09-02 04:20:03    
                Time zone: Asia/Kolkata (IST, +0530)  
System clock synchronized: yes                        
              NTP service: active                     
          RTC in local TZ: no    

Using GUI to turn NTP on or off

Open the Settings > Choose the Date & Time from left panel > Toggle the Automatic Date & Time button as per your needs.

Do check the following tutorial for more info.

1 Like