How to set system time on Kali linux?

6

3

I am trying to set the time, using e.g.

date -s "11/20/2003 12:00:00"

however, after a few moments, the system time resets to the current time. What am I doing wrong?

NTP should not get a different time, as this is a NTP server that has no connection to any other NTP server.

Phil

Posted 2015-01-27T13:03:48.390

Reputation: 103

Answers

4

if you have the npt > apt-get install ntp. You must stopping or uninstalling the service doesn't help.

timedatectl set-ntp 0 (off > sync disabled)
or     
timedatectl set-ntp 1 (on > sync enabled)

Disable with timedatectl set-ntp 0 then you can change date:

date --set 1998-11-02 
date --set 21:08:00

see Maintaining Time on Debian - Datetime and NTP client and server

Milor123

Posted 2015-01-27T13:03:48.390

Reputation: 115

0

Method 1:

root@kali:~# timedatectl set-"time-zone"**

NOTE: You can find your time-zone using timedatectl list-timezones

Method 2:

root@kali:~# timedatectl set-time "HH:MM:SS"**

NOTE: 24 - Hours Time Format

TIP: Make sure to synchronize your system clock (RTC) with the hardware clock as well.

root@kali:~# hwclock -w**

R3DB4R0N

Posted 2015-01-27T13:03:48.390

Reputation: 1