Ubuntu 16 , 从时间服务器更新时间

因为在公司的内网,所以不能用Ubuntu默认的服务器去更新时间。

只能改成从网关 10.182.202.2 上取时间

1) 如果没有安装ntp 的话,先安装

apt-get install ntp

2) 编辑 /etc/ntp.conf

server 10.182.208.2

3 )  执行下面的代码

sudo service ntp stop
sudo ntpd -gq
sudo service ntp start

 

参考:

https://askubuntu.com/questions/254826/how-to-force-a-clock-update-using-ntp

posted @ 2018-02-01 15:27  johnsonshu  阅读(1062)  评论(0编辑  收藏  举报