# 使用 Homebrew, MacPorts, Nix, pacman, apt, zypper 安装 ntp

查看 ntp 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:ntp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ntp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ntp
```

  证据: MacPorts ports tree: sysutils/ntp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ntp
```

  证据: nixpkgs package indexes: pkgs/by-name/nt/ntp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S ntp
```

  证据: Arch Linux sync databases: ntp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Ubuntu apt (92%):

```sh
sudo apt install ntp
```

  证据: Ubuntu 24.04 LTS package indexes: ntp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

- zypper (92%):

```sh
sudo zypper install ntp
```

  证据: openSUSE Tumbleweed package metadata: ntp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## 软件包事实

- **软件包键:** brew:ntp
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ntp>
- **版本:** 4.2.8p18
- **来源摘要:** Network Time Protocol (NTP) Distribution
- **主页:** <https://www.ntp.org>
- **仓库:** <https://bk.ntp.org/ntp-stable>
- **上游文档:** <https://www.ntp.org/documentation>
- **许可证:** BSD-2-Clause AND NTP
- **源码归档:** <https://downloads.nwtime.org/ntp/4.2.8/ntp-4.2.8p18.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- ntp-keygen (cli)
- ntp-wait (cli)
- ntpd (cli)
- ntpdate (cli)
- ntpdc (cli)
- ntpq (cli)
- ntptime (cli)
- ntptrace (cli)
- sntp (cli)
- update-leap (cli)
- ntp-keygen (别名)
- ntp-wait (别名)
- ntpd (别名)
- ntpdate (别名)
- ntpdc (别名)
- ntpq (别名)
- ntptime (别名)
- ntptrace (别名)
- sntp (别名)
- update-leap (别名)

## 依赖

- openssl@3

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 4.2.8p18
- 本地数据: OK
- 上游仓库: https://www.ntp.org
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

The NTP package is the classic Network Time Protocol distribution: daemon, query tools, key generation, SNTP utilities, leap-file updater, and compatibility commands for operating a network-synchronized system clock.

### 项目历史

NTP predates most packages in this database. The NTP FAQ says the first NTP implementation started around 1980, after earlier Internet clock-service work, and that the name Network Time Protocol first appeared in RFC 958 in September 1985. David L. Mills authored RFC 958.

The FAQ traces the protocol through RFC 1059 for NTP version 1 in 1988, RFC 1119 for version 2 with symmetric-key authentication, RFC 1305 for version 3 in 1992, and later NTPv4 work. It also notes that `xntp`, written by Dennis Fergusson at the University of Toronto, evolved into the public software distribution.

### 采用历史

NTP became foundational Internet infrastructure because clocks affect logs, authentication, distributed systems, filesystems, Kerberos, TLS validation, monitoring, and incident response. The package is less a trendy CLI than a long-lived system service that operating systems either ship directly or replace with compatible descendants such as chrony, systemd-timesyncd, OpenNTPD, or NTPsec.

The Homebrew package remains useful for admins who specifically need the reference-style tools such as `ntpd`, `ntpq`, `ntpdate`, `sntp`, and `ntptime` on macOS or in reproducible package environments.

### 使用方式

Package users configure servers and peers in `/etc/ntp.conf`, run `ntpd` as a daemon, inspect associations with `ntpq`, generate or manage keys with `ntp-keygen`, perform one-shot synchronization with `ntpdate` or `sntp`, and maintain leap-second data with `update-leap`.

The practical split is operational: small systems often only need client synchronization, while infrastructure operators care about strata, upstream server selection, authentication, drift behavior, and monitoring offset/jitter over time.

### 为什么软件包爱好者会关心

NTP is package history as infrastructure history. It is one of the quiet protocols that made distributed computing less chaotic, and the brew formula packages the traditional toolchain rather than a newer reimplementation.

### 时间线

- Around 1980: first NTP implementation, per the NTP FAQ.
- 1985-09: RFC 958, Network Time Protocol, published by David L. Mills.
- 1988: RFC 1059 specified NTP version 1.
- 1989: RFC 1119 specified NTP version 2.
- 1992: RFC 1305 specified NTP version 3.
- 2010-06: RFC 5905 specified NTP version 4.

### Related projects

- xntp
- NTPsec
- OpenNTPD
- chrony
- systemd-timesyncd

### 来源

- <https://formulae.brew.sh/formula/ntp>
- <https://www.ntp.org/ntpfaq/NTP-s-def-hist/>
- <https://www.rfc-editor.org/info/rfc1059>
- <https://www.rfc-editor.org/info/rfc1119>
- <https://www.rfc-editor.org/info/rfc1305>
- <https://www.rfc-editor.org/info/rfc5905>
- <https://www.rfc-editor.org/info/rfc958>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/ntp.conf

## Credential files

- Unix: /etc/ntp.keys
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ntp
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Nix - ntp: normalized package name match | nixpkgs package indexes: pkgs/by-name/nt/ntp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ntp - 1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2: normalized package name match | Ubuntu 24.04 LTS package indexes: ntp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Time Protocol daemon/utilities (transitional package) | https://www.ntpsec.org
- pacman - ntp - 4.2.8.p18-6: normalized package name match | Arch Linux sync databases: ntp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Network Time Protocol reference implementation | https://www.ntp.org/
- zypper - ntp - 4.2.8p18-2.2: normalized package name match | openSUSE Tumbleweed package metadata: ntp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Network Time Protocol daemon (version 4) | http://www.ntp.org/
- zypper - ntp-dcf77-tools - 4.2.8p18-2.2: normalized package name match | openSUSE Tumbleweed package metadata: ntp-dcf77-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | DCF77 related tools | http://www.ntp.org/
- zypper - ntp-doc - 4.2.8p18-2.2: normalized package name match | openSUSE Tumbleweed package metadata: ntp-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Additional Package Documentation for ntp | http://www.ntp.org/
- MacPorts - ntp: normalized package name match | MacPorts ports tree: sysutils/ntp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Ubuntu apt - ntpdate - 1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: ntpdate from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Time Protocol client (transitional package) | https://www.ntpsec.org
- Ubuntu apt - sntp - 1:4.2.8p15+dfsg-2~1.2.2+dfsg1-4build2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: sntp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Time Protocol client (transitional package) | https://www.ntpsec.org


## 相关链接

- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [openssl@3](https://www.automicvault.com/zh-hans/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [chrony](https://www.automicvault.com/zh-hans/pkg/brew/chrony/) - Shares av.db curated category or tags: cli, ntp, system, time-sync, time-synchronization.
- [apcupsd](https://www.automicvault.com/zh-hans/pkg/brew/apcupsd/) - Shares av.db curated category or tags: cli, daemon, system.
- [collectd](https://www.automicvault.com/zh-hans/pkg/brew/collectd/) - Shares av.db curated category or tags: cli, daemon, system.
- [dbus](https://www.automicvault.com/zh-hans/pkg/brew/dbus/) - Shares av.db curated category or tags: cli, daemon, system.
- [detach](https://www.automicvault.com/zh-hans/pkg/brew/detach/) - Shares av.db curated category or tags: cli, daemon, system.
- [direvent](https://www.automicvault.com/zh-hans/pkg/brew/direvent/) - Shares av.db curated category or tags: cli, daemon, system.
- [dwatch](https://www.automicvault.com/zh-hans/pkg/brew/dwatch/) - Shares av.db curated category or tags: cli, daemon, system.
- [fwupd](https://www.automicvault.com/zh-hans/pkg/brew/fwupd/) - Shares av.db curated category or tags: cli, daemon, system.
- [nut](https://www.automicvault.com/zh-hans/pkg/brew/nut/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, daemon, network, openssl, openssl-3.
- [syslog-ng](https://www.automicvault.com/zh-hans/pkg/brew/syslog-ng/) - Local package facts share a topical domain. Shared terms: cli, daemon, openssl, openssl-3, system.

## Combined YAML source

View the package source record on GitHub. [combined/ntp.yml](https://github.com/automic-vault/db/blob/main/combined/ntp.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
