Set Ubuntu Server Time through Terminal

Get the current server time by just typing “date” in the terminal.

Install Time Zone

$sudo aptitude install tzdata
$dpkg-reconfigure tzdata
$sudo vim /etc/ntp.conf

Add NTP server

driftfile /var/lib/ntp/ntp.drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server pool.ntp.org

Manually update the time by “$sudo ntpdate pool.ntp.org”

Advertisements