Enable Auto Time Sync On Ubuntu
May 13, 2018My system clock is off by 5 minutes, so I assume auto time synchrozation is not working properly. I try to check by using timedatectl
timedatectl
I get NTP enabled: yes
but NTP synchronized: no
.
Local time: Sat 2018-05-12 15:50:22 UTC
Universal time: Sat 2018-05-12 15:50:22 UTC
Timezone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
I try to run sudo ntpq -p
but command is not found. So I try to install ntp
.
sudo apt-get install ntp
Now I get NTP synchronized: yes
.
timedatectl
Local time: Sat 2018-05-12 15:52:33 UTC
Universal time: Sat 2018-05-12 15:52:33 UTC
Timezone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
The clock get updated within 5 minutes the above is done (yes, I believe the clock sync is not immediate).
I following command seems to enable immediate time sync, but I didn’t really get to test it.
sudo service ntp stop
sudo ntpdate -s time.nist.gov
sudo service ntp start
- algo-trading
- algolia
- analytics
- android
- android-ktx
- android-permission
- android-studio
- apps-script
- bash
- binance
- bootstrap
- bootstrapvue
- chartjs
- chrome
- cloud-functions
- coding-interview
- contentresolver
- coroutines
- crashlytics
- crypto
- css
- dagger2
- datastore
- datetime
- docker
- eslint
- firebase
- firebase-auth
- firebase-hosting
- firestore
- firestore-security-rules
- flask
- fontawesome
- fresco
- git
- github
- glide
- godot
- google-app-engine
- google-cloud-storage
- google-colab
- google-drive
- google-maps
- google-places
- google-play
- google-sheets
- gradle
- html
- hugo
- inkscape
- java
- java-time
- javascript
- jetpack-compose
- jetson-nano
- kotlin
- kotlin-serialization
- layout
- lets-encrypt
- lifecycle
- linux
- logging
- lubuntu
- markdown
- mate
- material-design
- matplotlib
- md5
- mongodb
- moshi
- mplfinance
- mysql
- navigation
- nginx
- nodejs
- npm
- nuxtjs
- nvm
- pandas
- payment
- pip
- pwa
- pyenv
- python
- recylerview
- regex
- room
- rxjava
- scoped-storage
- selenium
- social-media
- ssh
- ssl
- static-site-generator
- static-website-hosting
- sublime-text
- ubuntu
- unit-test
- uwsgi
- viewmodel
- viewpager2
- virtualbox
- vue-chartjs
- vue-cli
- vue-router
- vuejs
- vuelidate
- vuepress
- web-development
- web-hosting
- webpack
- windows
- workmanager
- wsl
- yarn