from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

87722

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->net-misc->ntp


ntp is the Network Time Protocol suite.

Installing ntpd

First, make sure ntp/ntpdate are installed. The package is by default installed on Mandrake Linux and Redhat. If you do not have ntp installed you will find packages on your distributions install-cd(s).

On Gentoo Linux, install by typing --- emerge ntp

Configuration files for running ntp as daemon

ntpd manpage

Client Setup

Now, edit the following files:

--- /etc/ntp.conf

The only important thing is that the line contains server some.thing.org.

Example:

--- server ntp.uio.no driftfile /etc/ntp/drift broadcastdelay 0.008 authenticate no ---

Make sure you add ntpd as a boot (init) service.

Gentoo Linux: `rc-update add ntpd default` , `/etc/init.d/ntpd start`

(LAN) Server setup

To run a ntp server to sync the clocks on your lan, edit

--- /etc/ntp.conf

Example:

--- server fartein.ifi.uio.no prefer server ntp.uio.no server ntp.eunet.no

fudge 10.0.0.50 stratum 10

driftfile /etc/ntp/drift broadcastdelay 0.008

authenticate no ---

fudge tells the server to pass on the correct time to the given network interface. stratum is the level of time servers, 10 being the lowest. You only need a higher number if you will be acting as a public internet timeserver with fast bandwidth.

It makes sence to add a few servers. Select the best as prefer

Make sure you add ntpd as a boot (init) service.

Gentoo Linux: `rc-update add ntpd default` , `/etc/init.d/ntpd start`

Firewalls

ntp uses port 123, both UDP and TCP. Make sure this port is not blocked by a firewall.

If you are using iptables, you can open this port with

--- $IPTABLES -A INPUT -j ACCEPT -p tcp --dport 123

Known valid and working ntp servers

server adress Location
ntp.ipv6.viagenie.qc.ca IPV6 ONLY
clock.via.net
server fartein.ifi.uio.no Norway
server ntp.uio.no Norway
server ntp.eunet.no Norway
ntp.demon.co.uk UK
ntp.nasa.gov USA
bigben.cac.washington.edu USA
time-b.nist.gov USA
montpelier.ilan.caltech.edu USA
nist1.aol-ca.truetime.com USA
nist1.datum.com USA
time-a.timefreq.bldrdoc.gov USA
time-b.timefreq.bldrdoc.gov USA
time-c.timefreq.bldrdoc.gov USA
time.nist.gov USA
utcnist.colorado.edu USA
tick.usno.navy.mil USA
tock.usno.navy.mil USA
mizbeaver.udel.edu USA

Server List

Setting the clock at boot or using cron

I good idea is _not_ to run the ntpd daemon on clients as it uses about 1,7 MB memory, unless you are a server or have a box with a broken clock. Many boxes clocks do drift along on their own, a check every hour or day is generally a good idea.

rdate

rdate is a simple 3 kB tool for syncing the system clock to a server. It's options are `-p` to print the date on the given server, `-s` to set the system clock according to it (must be done as root) and `-u` to use the UDP protocol. Example:

`rdate -p sntp.lth.se`

rdate manual page

clockspeed

clockspeed is a very small tool for setting the clock and is, for clients, a much better alternative than installing the 4+ MB ntp package.

cron & ntp

You can simply add ntpdate as a cron job every now and then:

--- echo 'ntpdate -b server.dot.com' > /etc/cron.hourly/time.cron --- chmod a+x /etc/cron.hourly/time.cron

Most distributions come with a cron. dcron and Vixie cron are nice.

Gentoo & ntp-client

You can set the clock using ntp at boot (without starting the daemon) on Gentoo Linux by editing:

--- /etc/conf.d/ntp-client

The file should contain:

--- NTPDATE_CMD="ntpdate" NTPDATE_OPTS="-b your.server.here" ---

Then add ntp-client to the services started at boot:

--- rc-update add ntp-client default

You can check what services are started at boot with `rc-status`.


Page source:

Copyright (c) 2000-2004 Øyvind Sæther. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-08-17
DBI - 1.652.0
Ebuild name:

dev-perl/DBI-1.652.0

Description

Database independent interface for Perl

Added to portage

2026-08-17

arti - 2.5.1
Ebuild name:

net-p2p/arti-2.5.1

Description

Implementation of Tor in Rust

Added to portage

2026-08-17

chrony_exporter - 0.14.0
Ebuild name:

app-metrics/chrony_exporter-0.14.0

Description

Chrony NTP exporter for Prometheus

Added to portage

2026-08-17

codipack - 3.1.2
Ebuild name:

sys-cluster/codipack-3.1.2

Description

Fast gradient evaluation in C++ based on Expression Templates

Added to portage

2026-08-17

gagit - 4
Ebuild name:

dev-vcs/gagit-4

Description

Gentoo AGit workflow tool

Added to portage

2026-08-17

kguiaddons - 6.29.0-r1
Ebuild name:

kde-frameworks/kguiaddons-6.29.0-r1

Description

Framework providing assorted high-level user interface componen

Added to portage

2026-08-17

kirigami - 6.29.0-r1
Ebuild name:

kde-frameworks/kirigami-6.29.0-r1

Description

Lightweight user interface framework for mobile and convergent ap

Added to portage

2026-08-17

libquo - 1.4.1
Ebuild name:

sys-cluster/libquo-1.4.1

Description

Run-time tuning of process binding policies made easy

Added to portage

2026-08-17

openpgp-keys-putty-release - 2026
Ebuild name:

sec-keys/openpgp-keys-putty-release-2026

Description

PuTTY Release Key

Added to portage

2026-08-17

putty - 0.85
Ebuild name:

net-misc/putty-0.85

Description

A Free Telnet/SSH Client

Added to portage

2026-08-17

tree-sitter - 0.26.12
Ebuild name:

dev-libs/tree-sitter-0.26.12

Description

Tree-sitter is a parser generator tool and an incremental parsing libr

Added to portage

2026-08-17

tree-sitter-cli - 0.26.12
Ebuild name:

dev-util/tree-sitter-cli-0.26.12

Description

Command-line tool for creating and testing tree-sitter grammars

Added to portage

2026-08-17

xaos - 4.3.7
Ebuild name:

x11-misc/xaos-4.3.7

Description

Very fast real-time fractal zoomer

Added to portage

2026-08-17

zsh - 5.9.2
Ebuild name:

app-shells/zsh-5.9.2

Description

UNIX Shell similar to the Korn shell

Added to portage

2026-08-17

zxing-cpp - 3.1.1
Ebuild name:

media-libs/zxing-cpp-3.1.1

Description

C++ Multi-format 1D/2D barcode image processing library

Added to portage

2026-08-17

2026-08-16
arj - 3.10.22_p29
Ebuild name:

app-arch/arj-3.10.22_p29

Description

Utility for opening arj archives

Added to portage

2026-08-16

backports-zstd - 1.7.0
Ebuild name:

dev-python/backports-zstd-1.7.0

Description

Backport of PEP-784 adding Zstandard to the standard library

Added to portage

2026-08-16

borgmatic - 2.1.7
Ebuild name:

app-backup/borgmatic-2.1.7

Description

Automatically create, prune and verify backups with borgbackup

Added to portage

2026-08-16

charset-normalizer - 3.5.1
Ebuild name:

dev-python/charset-normalizer-3.5.1

Description

The Real First Universal Charset Detector

Added to portage

2026-08-16

containerd - 2.3.4
Ebuild name:

app-containers/containerd-2.3.4

Description

A daemon to control runC

Added to portage

2026-08-16

crun - 1.29.1
Ebuild name:

app-containers/crun-1.29.1

Description

Fast and low-memory footprint OCI Container Runtime fully written in C

Added to portage

2026-08-16

duplicity - 3.2.0.1
Ebuild name:

app-backup/duplicity-3.2.0.1

Description

Secure backup system using GnuPG to encrypt data

Added to portage

2026-08-16

fastjsonschema - 2.22.2
Ebuild name:

dev-python/fastjsonschema-2.22.2

Description

Fast JSON schema validator for Python

Added to portage

2026-08-16

gcc - 13.4.1_p20260812
Ebuild name:

sys-devel/gcc-13.4.1_p20260812

Description

The GNU Compiler Collection

Added to portage

2026-08-16

gcc - 14.4.1_p20260813
Ebuild name:

sys-devel/gcc-14.4.1_p20260813

Description

The GNU Compiler Collection

Added to portage

2026-08-16

gcc - 15.3.1_p20260814
Ebuild name:

sys-devel/gcc-15.3.1_p20260814

Description

The GNU Compiler Collection

Added to portage

2026-08-16

gcc - 16.2.1_p20260815
Ebuild name:

sys-devel/gcc-16.2.1_p20260815

Description

The GNU Compiler Collection

Added to portage

2026-08-16

ggml - 0.19.0-r1
Ebuild name:

sci-ml/ggml-0.19.0-r1

Description

Tensor library for machine learning

Added to portage

2026-08-16

ggml - 0.20.0-r1
Ebuild name:

sci-ml/ggml-0.20.0-r1

Description

Tensor library for machine learning

Added to portage

2026-08-16

kitinerary - 26.04.3-r2
Ebuild name:

kde-apps/kitinerary-26.04.3-r2

Description

Data Model and Extraction System for Travel Reservation information

Added to portage

2026-08-16

libatasmart - 0.19_p6
Ebuild name:

dev-libs/libatasmart-0.19_p6

Description

Small and lightweight parser library for ATA S.M.A.R.T. hard disks

Added to portage

2026-08-16

macrostep-geiser - 0.2.0_p20210717
Ebuild name:

app-emacs/macrostep-geiser-0.2.0_p20210717

Description

Emacs macrostep back-end powered by geiser

Added to portage

2026-08-16

magit - 4.5.0-r1
Ebuild name:

app-emacs/magit-4.5.0-r1

Description

A Git porcelain inside Emacs

Added to portage

2026-08-16

magit - 4.6.0
Ebuild name:

app-emacs/magit-4.6.0

Description

A Git porcelain inside Emacs

Added to portage

2026-08-16

magit - 4.7.0
Ebuild name:

app-emacs/magit-4.7.0

Description

A Git porcelain inside Emacs

Added to portage

2026-08-16

magit - 9999
Ebuild name:

app-emacs/magit-9999

Description

A Git porcelain inside Emacs

Added to portage

2026-08-16

magit-popup - 2.13.3-r1
Ebuild name:

app-emacs/magit-popup-2.13.3-r1

Description

Define prefix-infix-suffix command combos

Added to portage

2026-08-16

mailcrypt - 3.5.9-r3
Ebuild name:

app-emacs/mailcrypt-3.5.9-r3

Description

Provides a simple interface to public key cryptography with OpenPGP

Added to portage

2026-08-16

man-pages-ja - 20260815
Ebuild name:

app-i18n/man-pages-ja-20260815

Description

Collection of manual pages translated into Japanese

Added to portage

2026-08-16

marginalia - 2.10
Ebuild name:

app-emacs/marginalia-2.10

Description

Marginalia in the minibuffer

Added to portage

2026-08-16

nanobind - 2.15.0
Ebuild name:

dev-python/nanobind-2.15.0

Description

Tiny and efficient C++/Python bindings

Added to portage

2026-08-16

nauty - 2.9.3
Ebuild name:

sci-mathematics/nauty-2.9.3

Description

Computing automorphism groups of graphs and digraphs

Added to portage

2026-08-16

obs-studio - 32.2.2
Ebuild name:

media-video/obs-studio-32.2.2

Description

Software for Recording and Streaming Live Video Content

Added to portage

2026-08-16

ollama - 0.32.9-r2
Ebuild name:

sci-ml/ollama-0.32.9-r2

Description

Get up and running with Llama 3, Mistral, Gemma, and other language models

Added to portage

2026-08-16

openbsd-netcat - 1.238_p1
Ebuild name:

net-analyzer/openbsd-netcat-1.238_p1

Description

The OpenBSD network swiss army knife

Added to portage

2026-08-16

openrgb - 1.0_rc3
Ebuild name:

app-misc/openrgb-1.0_rc3

Description

Open source RGB lighting control

Added to portage

2026-08-16

podman - 5.8.6
Ebuild name:

app-containers/podman-5.8.6

Description

A tool for managing OCI containers and pods with Docker-compatible CLI

Added to portage

2026-08-16

podman - 6.1.0
Ebuild name:

app-containers/podman-6.1.0

Description

A tool for managing OCI containers and pods with Docker-compatible CLI

Added to portage

2026-08-16

python-json-logger - 4.2.0
Ebuild name:

dev-python/python-json-logger-4.2.0

Description

Standard python logging to output log data as json objects

Added to portage

2026-08-16

pywayland - 0.4.19
Ebuild name:

dev-python/pywayland-0.4.19

Description

Python bindings for the libwayland library

Added to portage

2026-08-16

qemu - 10.2.3-r1
Ebuild name:

app-emulation/qemu-10.2.3-r1

Description

QEMU + Kernel-based Virtual Machine userland tools

Added to portage

2026-08-16

shtab - 1.11.0
Ebuild name:

dev-python/shtab-1.11.0

Description

Automagic shell tab completion for Python CLI applications

Added to portage

2026-08-16

sip - 6.16.1
Ebuild name:

dev-python/sip-6.16.1

Description

Python bindings generator for C/C++ libraries

Added to portage

2026-08-16

tifffile - 2026.8.16
Ebuild name:

dev-python/tifffile-2026.8.16

Description

Read and write TIFF files

Added to portage

2026-08-16

webencodings - 0.6.1
Ebuild name:

dev-python/webencodings-0.6.1

Description

Character encoding aliases for legacy web content

Added to portage

2026-08-16

wrapt - 2.4.0_rc4
Ebuild name:

dev-python/wrapt-2.4.0_rc4

Description

Module for decorators, wrappers and monkey patching

Added to portage

2026-08-16

zabbix - 6.0.48
Ebuild name:

net-analyzer/zabbix-6.0.48

Description

ZABBIX is software for monitoring of your applications, network and serv

Added to portage

2026-08-16

zabbix - 7.0.29
Ebuild name:

net-analyzer/zabbix-7.0.29

Description

ZABBIX is software for monitoring of your applications, network and serv

Added to portage

2026-08-16

zabbix - 7.4.13
Ebuild name:

net-analyzer/zabbix-7.4.13

Description

ZABBIX is software for monitoring of your applications, network and serv

Added to portage

2026-08-16

zip - 3.0_p16
Ebuild name:

app-arch/zip-3.0_p16

Description

Info ZIP (encryption support)

Added to portage

2026-08-16

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 21.1 ms