Infolinks

Breaking

Adsense

Friday, December 7, 2018

Unable To Change Date and Time Settings in Ubuntu 16.04 Using Terminal

I've been trying to change the server date for testing but can't change it. I tried several commands such as the command below but failed.

sudo date --set "07 DEC 2018 3:00 PM"

We'll be using timedatectl to achieve this. But first, make sure to turn off ntp a TCP/IP protocol for synchronizing time over a network. Basically a client requests the current time from a server, and uses it to set its own clock. That's why no matter how many times you change the date of your server but still the date and time is the same.

Disable NTP
sudo timedatectl set-ntp 0 

Set the date and time
sudo timedatectl set-time "2018-12-07 15:00:00"

Check if date and time has been changed
sudo date

To enable NTP and return to original date and time
sudo timedatectl set-ntp 1

Unable To Change Date and Time Settings in Ubuntu 16.04 Using Terminal

No comments:

Post a Comment

Adbox