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:

85325

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-05-24
2026-05-23
awscli - 1.45.14
Ebuild name:

app-admin/awscli-1.45.14

Description

Universal Command Line Environment for AWS

Added to portage

2026-05-23

blessed - 1.42.0
Ebuild name:

dev-python/blessed-1.42.0

Description

Library for making terminal apps using colors, keyboard input and positio

Added to portage

2026-05-23

boto3 - 1.43.14
Ebuild name:

dev-python/boto3-1.43.14

Description

The AWS SDK for Python

Added to portage

2026-05-23

botocore - 1.43.14
Ebuild name:

dev-python/botocore-1.43.14

Description

Low-level, data-driven core of boto 3

Added to portage

2026-05-23

c2ffi - 21.1.0.20260104
Ebuild name:

dev-lisp/c2ffi-21.1.0.20260104

Description

Clang-based FFI wrapper generator for Common Lisp

Added to portage

2026-05-23

click - 8.4.1
Ebuild name:

dev-python/click-8.4.1

Description

A Python package for creating beautiful command line interfaces

Added to portage

2026-05-23

crossdev - 20260501-r1
Ebuild name:

sys-devel/crossdev-20260501-r1

Description

Gentoo Cross-toolchain generator

Added to portage

2026-05-23

cucumber-expressions - 19.0.1
Ebuild name:

dev-python/cucumber-expressions-19.0.1

Description

Human friendly alternative to Regular Expressions

Added to portage

2026-05-23

deno-bin - 2.8.0
Ebuild name:

dev-lang/deno-bin-2.8.0

Description

Modern runtime for JavaScript and TypeScript

Added to portage

2026-05-23

faker - 40.19.1
Ebuild name:

dev-python/faker-40.19.1

Description

A Python package that generates fake data for you

Added to portage

2026-05-23

gentoo-sources - 7.0.9-r5
Ebuild name:

sys-kernel/gentoo-sources-7.0.9-r5

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2026-05-23

gnome-settings-daemon - 49.1-r1
Ebuild name:

gnome-base/gnome-settings-daemon-49.1-r1

Description

Gnome Settings Daemon

Added to portage

2026-05-23

gr-rds - 0.0_p20250404-r1
Ebuild name:

net-wireless/gr-rds-0.0_p20250404-r1

Description

GNU Radio FM RDS Receiver

Added to portage

2026-05-23

graph-tool - 2.98
Ebuild name:

dev-python/graph-tool-2.98

Description

An efficient python module for manipulation and statistical analysis of

Added to portage

2026-05-23

griddataformats - 1.2.0
Ebuild name:

dev-python/griddataformats-1.2.0

Description

Reading and writing of data on regular grids in Python

Added to portage

2026-05-23

icalendar - 7.1.2
Ebuild name:

dev-python/icalendar-7.1.2

Description

RFC 5545 compatible parser and generator of iCalendar files

Added to portage

2026-05-23

jellyfin-bin - 10.11.9
Ebuild name:

www-apps/jellyfin-bin-10.11.9

Description

Jellyfin puts you in control of managing and streaming your media

Added to portage

2026-05-23

jinxed - 2.0.1
Ebuild name:

dev-python/jinxed-2.0.1

Description

A pure-Python implementation of a subset of the Python curses library

Added to portage

2026-05-23

jwt-cpp - 0.7.2-r1
Ebuild name:

dev-cpp/jwt-cpp-0.7.2-r1

Description

header only library for creating and validating JSON Web Tokens in C++11

Added to portage

2026-05-23

libgit2 - 1.9.4
Ebuild name:

dev-libs/libgit2-1.9.4

Description

A linkable library for Git

Added to portage

2026-05-23

liblms7002m - 0.0_p20200518-r3
Ebuild name:

net-wireless/liblms7002m-0.0_p20200518-r3

Description

Compact LMS7002M library suitable for resource-limited MC

Added to portage

2026-05-23

lmod - 9.2.2
Ebuild name:

sys-cluster/lmod-9.2.2

Description

Environment Module System based on Lua

Added to portage

2026-05-23

more-itertools - 11.1.0
Ebuild name:

dev-python/more-itertools-11.1.0

Description

More routines for operating on iterables, beyond itertools

Added to portage

2026-05-23

multi-term - 1.4-r1
Ebuild name:

app-emacs/multi-term-1.4-r1

Description

Manage multiple terminal buffers in Emacs

Added to portage

2026-05-23

nginx - 1.30.2
Ebuild name:

www-servers/nginx-1.30.2

Description

Added to portage

2026-05-23

nvidia-drivers - 595.44.09
Ebuild name:

x11-drivers/nvidia-drivers-595.44.09

Description

NVIDIA Accelerated Graphics Driver

Added to portage

2026-05-23

pika - 1.4.1
Ebuild name:

dev-python/pika-1.4.1

Description

Pure-Python implementation of the AMQP

Added to portage

2026-05-23

portage - 3.0.79
Ebuild name:

sys-apps/portage-3.0.79

Description

The package management and distribution system for Gentoo

Added to portage

2026-05-23

pypdf - 6.12.1
Ebuild name:

dev-python/pypdf-6.12.1

Description

Python library to work with PDF files

Added to portage

2026-05-23

pytest-rerunfailures - 16.3
Ebuild name:

dev-python/pytest-rerunfailures-16.3

Description

pytest plugin to re-run tests to eliminate flaky failures

Added to portage

2026-05-23

qtdeclarative - 6.11.1-r1
Ebuild name:

dev-qt/qtdeclarative-6.11.1-r1

Description

Qt Declarative (Quick 2)

Added to portage

2026-05-23

qtile - 0.36.0
Ebuild name:

x11-wm/qtile-0.36.0

Description

A full-featured, hackable tiling window manager written in Python

Added to portage

2026-05-23

raspberrypi-firmware - 1.20260521
Ebuild name:

sys-boot/raspberrypi-firmware-1.20260521

Description

Raspberry Pi (all versions) bootloader and GPU firmware

Added to portage

2026-05-23

raspberrypi-image - 6.18.32_p20260521
Ebuild name:

sys-kernel/raspberrypi-image-6.18.32_p20260521

Description

Raspberry Pi (all versions) kernel and modules

Added to portage

2026-05-23

raspberrypi-sources - 6.18.32_p20260521
Ebuild name:

sys-kernel/raspberrypi-sources-6.18.32_p20260521

Description

Raspberry Pi kernel sources

Added to portage

2026-05-23

snapd-glib - 1.72
Ebuild name:

sys-libs/snapd-glib-1.72

Description

glib library for communicating with snapd

Added to portage

2026-05-23

sunshine - 2026.516.143833
Ebuild name:

net-misc/sunshine-2026.516.143833

Description

Self-hosted game stream host for Moonlight

Added to portage

2026-05-23

superlu_mt - 4.0.2
Ebuild name:

sci-libs/superlu_mt-4.0.2

Description

Multithreaded sparse LU factorization library

Added to portage

2026-05-23

trove-classifiers - 2026.5.22.10
Ebuild name:

dev-python/trove-classifiers-2026.5.22.10

Description

Canonical source for classifiers on PyPI (pypi.org)

Added to portage

2026-05-23

virt-firmware - 26.5.4
Ebuild name:

app-emulation/virt-firmware-26.5.4

Description

Tools for ovmf/armvirt firmware volumes

Added to portage

2026-05-23

vpl-gpu-rt - 26.2.0
Ebuild name:

media-libs/vpl-gpu-rt-26.2.0

Description

Intel Video Processing Library GPU Runtime

Added to portage

2026-05-23

wrapt - 2.2.1
Ebuild name:

dev-python/wrapt-2.2.1

Description

Module for decorators, wrappers and monkey patching

Added to portage

2026-05-23

yle-dl - 20260520
Ebuild name:

media-video/yle-dl-20260520

Description

Download media files from Yle Areena

Added to portage

2026-05-23

zotero-bin - 9.0.4
Ebuild name:

app-text/zotero-bin-9.0.4

Description

Helps you collect, organize, cite, and share your research sources

Added to portage

2026-05-23

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