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:

88181

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-09-06
getmail - 6.20.01
Ebuild name:

net-mail/getmail-6.20.01

Description

A mail retriever with reliable Maildir and mbox delivery

Added to portage

2026-09-06

mongodb - 8.0.29
Ebuild name:

dev-db/mongodb-8.0.29

Description

A high-performance, open source, schema-free document-oriented database

Added to portage

2026-09-06

mongodb - 8.3.8
Ebuild name:

dev-db/mongodb-8.3.8

Description

A high-performance, open source, schema-free document-oriented database

Added to portage

2026-09-06

pure-eval - 0.2.3-r1
Ebuild name:

dev-python/pure-eval-0.2.3-r1

Description

Safely evaluate AST nodes without side effects

Added to portage

2026-09-06

readme-renderer - 46.0-r1
Ebuild name:

dev-python/readme-renderer-46.0-r1

Description

A library for rendering 'readme' descriptions for Warehouse

Added to portage

2026-09-06

2026-09-05
alembic - 1.19.2
Ebuild name:

dev-python/alembic-1.19.2

Description

Database migrations tool, written by the author of SQLAlchemy

Added to portage

2026-09-05

boto3 - 1.43.89
Ebuild name:

dev-python/boto3-1.43.89

Description

The AWS SDK for Python

Added to portage

2026-09-05

botocore - 1.43.89
Ebuild name:

dev-python/botocore-1.43.89

Description

Low-level, data-driven core of boto 3

Added to portage

2026-09-05

cachebox - 6.2.7
Ebuild name:

dev-python/cachebox-6.2.7

Description

The fastest memoizing and caching Python library written in Rust

Added to portage

2026-09-05

ceph - 20.2.1-r4
Ebuild name:

sys-cluster/ceph-20.2.1-r4

Description

Ceph distributed filesystem

Added to portage

2026-09-05

ceph - 20.2.4
Ebuild name:

sys-cluster/ceph-20.2.4

Description

Ceph distributed filesystem

Added to portage

2026-09-05

derper - 1.102.2-r1
Ebuild name:

net-vpn/derper-1.102.2-r1

Description

DERP server for tailscale network

Added to portage

2026-09-05

dovecot - 2.4.5-r1
Ebuild name:

net-mail/dovecot-2.4.5-r1

Description

An IMAP and POP3 server written with security primarily in mind

Added to portage

2026-09-05

firefox - 155.0.1
Ebuild name:

www-client/firefox-155.0.1

Description

Firefox Web Browser

Added to portage

2026-09-05

firefox-bin - 155.0.1
Ebuild name:

www-client/firefox-bin-155.0.1

Description

Firefox Web Browser

Added to portage

2026-09-05

firefox-l10n - 155.0.1
Ebuild name:

www-client/firefox-l10n-155.0.1

Description

Firefox Web Browser's translation files

Added to portage

2026-09-05

flask-caching - 2.5.1
Ebuild name:

dev-python/flask-caching-2.5.1

Description

Adds caching support to Flask applications

Added to portage

2026-09-05

gentoo-bashcomp - 20260905
Ebuild name:

app-shells/gentoo-bashcomp-20260905

Description

Gentoo-specific bash command-line completions (emerge, ebuild,

Added to portage

2026-09-05

ggml - 0.23.0
Ebuild name:

sci-ml/ggml-0.23.0

Description

Tensor library for machine learning

Added to portage

2026-09-05

gpgmepy - 2.0.0-r2
Ebuild name:

dev-python/gpgmepy-2.0.0-r2

Description

GnuPG Made Easy is a library for making GnuPG easier to use (Python bin

Added to portage

2026-09-05

ibus-typing-booster - 2.31.0
Ebuild name:

app-i18n/ibus-typing-booster-2.31.0

Description

Completion input method for IBus

Added to portage

2026-09-05

jupyter-builder - 1.2.3
Ebuild name:

dev-python/jupyter-builder-1.2.3

Description

JupyterLab build tools

Added to portage

2026-09-05

kquickimageeditor - 0.7.0.1
Ebuild name:

media-libs/kquickimageeditor-0.7.0.1

Description

QtQuick components providing basic image editing capabilities

Added to portage

2026-09-05

ledger-mode - 4.0.0
Ebuild name:

app-emacs/ledger-mode-4.0.0

Description

An Emacs major mode for editing ledger files

Added to portage

2026-09-05

libxml2 - 2.15.4
Ebuild name:

dev-libs/libxml2-2.15.4

Description

XML C parser and toolkit

Added to portage

2026-09-05

ollama - 0.33.3
Ebuild name:

sci-ml/ollama-0.33.3

Description

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

Added to portage

2026-09-05

pdns-recursor - 5.4.6
Ebuild name:

net-dns/pdns-recursor-5.4.6

Description

The PowerDNS Recursor

Added to portage

2026-09-05

pebble - 5.2.2
Ebuild name:

dev-python/pebble-5.2.2

Description

Threading and multiprocessing eye-candy

Added to portage

2026-09-05

pkgcheck - 0.10.43
Ebuild name:

dev-util/pkgcheck-0.10.43

Description

pkgcore-based QA utility for ebuild repos

Added to portage

2026-09-05

pkgcore - 0.12.42
Ebuild name:

sys-apps/pkgcore-0.12.42

Description

a framework for package management

Added to portage

2026-09-05

pkgdev - 0.2.18
Ebuild name:

dev-util/pkgdev-0.2.18

Description

Collection of tools for Gentoo development

Added to portage

2026-09-05

py-landlock - 0.1.1
Ebuild name:

dev-python/py-landlock-0.1.1

Description

Python bindings for the Linux Landlock security module

Added to portage

2026-09-05

pygraphviz - 2.0.1-r1
Ebuild name:

dev-python/pygraphviz-2.0.1-r1

Description

Python wrapper for the Graphviz Agraph data structure

Added to portage

2026-09-05

pymongo - 4.18.0
Ebuild name:

dev-python/pymongo-4.18.0

Description

Python driver for MongoDB

Added to portage

2026-09-05

pypdf - 6.17.0
Ebuild name:

dev-python/pypdf-6.17.0

Description

Python library to work with PDF files

Added to portage

2026-09-05

securesystemslib - 1.5.1
Ebuild name:

dev-python/securesystemslib-1.5.1

Description

Cryptographic routines for Secure Systems Lab projects at NYU

Added to portage

2026-09-05

snakeoil - 0.11.6
Ebuild name:

dev-python/snakeoil-0.11.6

Description

misc common functionality and useful optimizations

Added to portage

2026-09-05

spidermonkey - 153.2.0
Ebuild name:

dev-lang/spidermonkey-153.2.0

Description

Mozilla's JavaScript engine written in C and C++

Added to portage

2026-09-05

stockfish - 19
Ebuild name:

games-board/stockfish-19

Description

Free UCI chess engine, claimed to be the strongest in the world

Added to portage

2026-09-05

towncrier - 26.9.0
Ebuild name:

dev-python/towncrier-26.9.0

Description

Building newsfiles for your project

Added to portage

2026-09-05

ujson - 6.0.0
Ebuild name:

dev-python/ujson-6.0.0

Description

Ultra fast JSON encoder and decoder for Python

Added to portage

2026-09-05

util-linux - 2.42.3
Ebuild name:

sys-apps/util-linux-2.42.3

Description

Various useful Linux utilities

Added to portage

2026-09-05

uv - 0.12.10
Ebuild name:

dev-python/uv-0.12.10

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-09-05

uv-build - 0.12.10
Ebuild name:

dev-python/uv-build-0.12.10

Description

PEP517 uv build backend

Added to portage

2026-09-05

wine-staging - 11.17
Ebuild name:

app-emulation/wine-staging-11.17

Description

Free implementation of Windows(tm) on Unix, with Wine-Staging patc

Added to portage

2026-09-05

wine-vanilla - 11.17
Ebuild name:

app-emulation/wine-vanilla-11.17

Description

Free implementation of Windows(tm) on Unix, without external patch

Added to portage

2026-09-05

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