首页 > Ubuntu 18.04时间同步

Ubuntu 18.04时间同步

Ubuntu 18.04时间同步

原文连接:

原文链接

内容:

Sync Clock with Time Servers through the Command Line

Check Current Time Status

The timedatectl command lets you check the current time status of your system clock. Open your Ubuntu terminal through Ctrl+Alt+T and enter the following command:

$ timedatectl status

在这里插入图片描述

Check time with timedatectl

Among other details, you can see the Local time, the Universal time and also if your system clock is synchronized with the internet time servers or not.

Synchronize the System Time

The chronyd command lets you check the time by which your system clock is off. If you run a chronyd command without installing the utility first, you will get the following message:

在这里插入图片描述

The chronyd command

Please install the Chrony utility as follows:

$ sudo apt install chrony

在这里插入图片描述

You can then use the following command to see how much your time varies from the internet server. The “System clock wrong by” line in the output indicates this thing.

$ sudo chronyd -Q

You can also synchronize the system time and see the “System clock wrong by” information in one go through the following command:

$ sudo chronyd -q

In the following example, you can see that when I first ran the chronyd -q command, my system was off by 95.9 seconds. After running the command, my internet time was reset and that can be observed when I re-ran the command. This time my system clock is only off by -0.001446 seconds which is an ignorable difference.

在这里插入图片描述

Using chronyd

On the Ubuntu Desktop (GUI)

Operating Systems these days are set to fetch Date & Time and Time zones automatically through the internet. You can set your system to fetch date and time according to the selected time zone as follows:

Click the downward arrow located at the top right corner of your Ubuntu desktop and then click the settings icon located at the bottom left corner:

在这里插入图片描述

Click on settings Icon

OR

Type Settings in the Ubuntu Dash as follows:

在这里插入图片描述

Open settings

Click the Details tab and then select the Date & Time option.

在这里插入图片描述

Make sure your Automatic Date & Time button is turned on. This will enable you to automatically fetch the current date and time from the internet server.

Automatic date and time synchronisation

更多相关:

  • 上篇笔记中梳理了一把 resolver 和 balancer,这里顺着前面的流程走一遍入口的 ClientConn 对象。ClientConn// ClientConn represents a virtual connection to a conceptual endpoint, to // perform RPCs. // //...

  • 我的实验是基于PSPNet模型实现二维图像的语义分割,下面的代码直接从得到的h5文件开始往下做。。。 也不知道是自己的检索能力出现了问题还是咋回事,搜遍全网都没有可以直接拿来用的语义分割代码,东拼西凑,算是搞成功了。 实验平台:Windows、VS2015、Tensorflow1.8 api、Python3.6 具体的流程为:...

  • Path Tracing 懒得翻译了,相信搞图形学的人都能看得懂,2333 Path Tracing is a rendering algorithm similar to ray tracing in which rays are cast from a virtual camera and traced through a s...

  • configure_file( [COPYONLY] [ESCAPE_QUOTES] [@ONLY][NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ]) 我遇到的是 configure_file(config/config.in ${CMAKE_SOURCE_DIR}/...

  •     直接复制以下代码创建一个名为settings.xml的文件,放到C:UsersAdministrator.m2下即可