Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a programmer working on embedded linux,

On my device, I need to set time everytime when I want to use it to check my program.

Is there any command or script which sets time from some Internet timeserver everytime?


share|improve this question

Most likely which ever linux disto your working on has a NTP package which will allow you to sync with any pulic NTP server

Tutorial for ubuntu(should be similar in other distros):

Time servers:

share|improve this answer

You will have to have the ntp package installed.

If ntp is running:

ntpdate -u

otherwise without ntp running, I believe it would be:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.