「システム設定->時刻と日付->インターネットから自動的に」をクリックすると、インターネットから時刻を同期できます。
しかし、ntpdデーモンはインストールされていません(インストールされていません)。それでは、同期はどのように機能しますか?
Automatically from the Internetオプションや関連するものも表示されません。
「システム設定->時刻と日付->インターネットから自動的に」をクリックすると、インターネットから時刻を同期できます。
しかし、ntpdデーモンはインストールされていません(インストールされていません)。それでは、同期はどのように機能しますか?
Automatically from the Internetオプションや関連するものも表示されません。
回答:
これは、ntpdateツールとの同期によって行われ ます。
man ntpdate
NAME
ntpdate - set the date and time via NTP
ntpdate sets the local date and time by polling the Network Time Proto‐
col (NTP) server(s) given as the server arguments to determine the cor‐
rect time. It must be run as root on the local host (unless the option
-q is used). A number of samples are obtained from each of the servers
specified and a subset of the NTP clock filter and selection algorithms
are applied to select the best of these. Note that the accuracy and
reliability of ntpdate depends on the number of servers, the number of
polls each time it is run and the interval between runs.
ntpdate can be run manually as necessary to set the host clock, or it
can be run from the host startup script to set the clock at boot time.
This is useful in some cases to set the clock initially before starting
the NTP daemon ntpd. It is also possible to run ntpdate from a cron
script. However, it is important to note that ntpdate with contrived
cron scripts is no substitute for the NTP daemon, which uses sophisti‐
cated algorithms to maximize accuracy and reliability while minimizing
resource use. Finally, since ntpdate does not discipline the host clock
frequency as does ntpd, the accuracy using ntpdate is limited.
あなたはそうすることができます
sudo ntpdate TIME-SERVER
TIME-SERVERリストはここにあります
Ubuntu ntpdateは、ネットワーク接続が確立されるたびにユーティリティと同期します(通常は起動時に発生します)。
このユーティリティはデフォルトでインストールされますが、Ubuntuが呼び出したときにのみ実行され、デーモンとしてバックグラウンドで実行されたままになりません。
インストールntpパッケージは、NTPデーモンがインストールされます。ntpデーモンを使用すると、システムの実行中に継続的に時刻を同期できます。
更新:Ubuntuの最近のバージョン(16.04など)ntpdateは、に置き換えられますtimedatectl。これは、起動時とネットワークの起動時に1回同期しますが、それ以外の時間は実行し続けません。詳細については、https://help.ubuntu.com/lts/serverguide/NTP.htmlを参照してください。
dpkg-query --listfiles ntpdateてください/etc/network/if-up.d/ntpdate。
timedatectlいます。これは同様に機能します。
16.04 LTSの時刻同期は、sytemdによって特に「timedatectl」で処理されるようです。
timedatectl status
Local time: Wed 2016-11-30 17:45:18 CST
Universal time: Wed 2016-11-30 23:45:18 UTC
RTC time: Sun 2016-12-04 06:50:39
Time zone: America/Chicago (CST, -0600)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
構成は
/etc/systemd/timesyncd.conf
詳細はこちら:NTP およびtimedatectl による時刻同期
また、インストールされていないサービスへのフロントエンドインターフェイスが存在する可能性があることに注意してください。
フロントエンド(GUI)インターフェイスの設定は必要に応じて変更できますが、タスクを実際に実行するサービスがインストールされていない場合、何も起こりません。
ただし、「スイッチ」は、各ブートで1回限りの更新を行うように指示するため、有効だと思うことに注意してください。(またはそうしない)。
これがネットワークに接続されていないシステムであるか、または「標準」時間と一致するように時間を設定しない他の重要な理由がない限り、ntpdをインストールし、適切に構成して実行することを強くお勧めします。
参照:https : //help.ubuntu.com/community/UbuntuTime
Ubuntuにはntpdateが標準で付属しており、ブート時に1回実行して、UbuntuのNTPサーバーに従って時刻を設定します。ただし、システムのクロックは、リブート間の時間が長い場合、リブート間でかなりドリフトする可能性があります。その場合、時間を時々修正するのが理にかなっています。これを行う最も簡単な方法は、cronを毎日実行することです。
ntpdate ntp.ubuntu.com
ntpd(help.ubuntu.com/lts/serverguide/NTP.html#ntpd)を使用して同期を維持できます。
何らかの理由で、16.04に、Maythuxの答えはすぐには機能しません。
しかし、そこから先導して、これは私のために働いた。
$ sudo ntpdate-debian
sudo当然、特権が必要なことに注意してください。
ntpdate内部では、設定ファイルのみが異なるツールを使用します。
ntpdate-debianデフォルトでntpdate(8)設定を使用すること を除いて、と同じ/etc/default/ntpdateです。ntpdateは、Network Time Protocol(NTP)サーバーをポーリングすることにより、ローカルの日付と時刻を設定します。
sudo ntpdate-debianでは、と同じsudo ntpdate ntp.ubuntu.comです。奇妙なのは、なぜ彼らがdebianからこのパッケージを選んで調整し、is identical to ntpdate(8) except that it uses the configuration in /etc/default/ntpdate by defaultこのファイルを読んでこのファイルをcattingしたのNTPDATE_USE_NTP_CONF=yes # List of NTP servers to use (Separate multiple servers with spaces.) # Not used if NTPDATE_USE_NTP_CONF is yes. NTPSERVERS="ntp.ubuntu.com"か???
さて、Ubuntuの最近のリリースではしばしばchronyを使用していますが、これはntpの代替実装であり、いくつかの違いがあります。
詳細については、https://chrony.tuxfamily.org/を参照してください。
ntpdateを起動するntpため、スイッチではなくボタンである必要があります。インターネットと継続的に時刻を同期させるには、手動でインストールする必要があります。bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/…で