---
title: "linux时间自动同步"
author: "奔跑的羚羊"
date: "2015-03-20T15:29:23Z"
tags: []
categories: ["开源软件"]
slug: "linux"
draft: false
lastmod: "2015-03-20T15:29:23Z"
id: 2194276
url: "https://running.iteye.com/blog/2194276"
---

1.查看当前时间

```java

#date  
Fri Mar 20 07:16:02 UTC 2015

```


2.修改为中国时区

```java

rm -rf /etc/localtime  
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  

```


3.同步时间

```java
ntpdate -s cn.pool.ntp.org
```



中国国家北京时间授时中心:
http://www.time.ac.cn/stime.asp
权威服务器： pool.ntp.org，推荐使用cn.pool.ntp.org(中国的公共NTP服务器)
复旦大学：ntp.fudan.edu.cn
台湾中央研究院：stdtime.sinica.edu.tw
台警大授时中心(台湾)：asia.pool.ntp.org
中科院授时中心(西安)：210.72.145.44
上海交大：202.120.2.101
美国的：time.nist.gov 192.43.244.18