I am new to Ubuntu 16.04 LTS. The time on my machine is not updating from internet. I have changed the CMOS battery and also installed ntp
and ntpdate
and ran sudo ntpdate ntp.ubuntu.com
. But none of these worked for me.
Running below command temporarily updates the time
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
Is there any other way to update my system time? I don't want to set it manually every session.