setting time ubuntu

Posted on 2010-08-19
Last Modified: 2013-12-15
trying to set the date on a pc running ubuntu

kernel version
version 9.04

i'm running the command:

and i get the response
ntpdate: can't find host
ntpdate: no servers can be used, exiting

note the pc is plugged into the network.

does anyone know a solution?

Question by:gerrymac1943
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
LVL 18

Accepted Solution

TobiasHolm earned 125 total points
ID: 33474274

Use: sudo ntpdate

Regards, Tobias
LVL 18

Expert Comment

ID: 33474336
Can you ping ?

Regards, Tobias
LVL 18

Expert Comment

ID: 33474345
(I suggested to ping just to see that the DNS works)
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 35

Assisted Solution

torimar earned 250 total points
ID: 33474382
If the server should be temporarily unavailable, simply use another ntp server from
Check the panel on the right hand side here for your region in the world:
Click that region and select an appropriate server.
sudo ntpdate (USA)
sudo ntpdate (Canada)
sudo ntpdate (Australia)

If you are behind a proxy, ntp will not work.
Try the workaround specified here:


Assisted Solution

ssapkota earned 125 total points
ID: 33477634
You seem to have DNS issue,
Try this one:
sudo ntpdate

Author Comment

ID: 33522675
sorry get a response 'no servers can be used'

how do i fix the dns issue?
LVL 35

Assisted Solution

torimar earned 250 total points
ID: 33523074
It doesn't appear to be a DNS issue; it rather appears to be a known bug with "ntpdate-debian".
After reading this:
I'd say your options are to a) either edit the ntpdate-debian script and set NTPDATE_USE_NTP_CONF=yes to NTPDATE_USE_NTP_CONF=no, or b) to simply rename the /etc/ntp.conf file to /etc/ntp.conf.bad.

Then run
again and see if it works.

Author Closing Comment

ID: 33590391

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question