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:

87238

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-07-28
krita - 6.0.3
Ebuild name:

media-gfx/krita-6.0.3

Description

Free digital painting application. Digital Painting, Creative Freedom

Added to portage

2026-07-28

libwebsockets - 5.0.0
Ebuild name:

net-libs/libwebsockets-5.0.0

Description

A flexible pure-C library for implementing network protocols

Added to portage

2026-07-28

ruff - 0.16.0
Ebuild name:

dev-util/ruff-0.16.0

Description

An extremely fast Python linter, written in Rust

Added to portage

2026-07-28

ttyd - 1.7.7-r2
Ebuild name:

www-apps/ttyd-1.7.7-r2

Description

ttyd, a simple command-line tool for sharing terminal over the web

Added to portage

2026-07-28

2026-07-27
atari800 - 7.1.2
Ebuild name:

games-emulation/atari800-7.1.2

Description

Emulator of Atari 8-bit computer systems and 5200 game console

Added to portage

2026-07-27

backrefs - 8.0
Ebuild name:

dev-python/backrefs-8.0

Description

Wrapper around re or regex that adds additional back references

Added to portage

2026-07-27

cares-tools - 0.4
Ebuild name:

net-dns/cares-tools-0.4

Description

c-ares tools host, nslookup

Added to portage

2026-07-27

courier - 2.0.6
Ebuild name:

mail-mta/courier-2.0.6

Description

An MTA designed specifically for maildirs

Added to portage

2026-07-27

fastjsonschema - 2.22.0
Ebuild name:

dev-python/fastjsonschema-2.22.0

Description

Fast JSON schema validator for Python

Added to portage

2026-07-27

gamescope - 3.16.25-r1
Ebuild name:

gui-wm/gamescope-3.16.25-r1

Description

Efficient micro-compositor for running games

Added to portage

2026-07-27

gcc - 13.4.1_p20260722
Ebuild name:

sys-devel/gcc-13.4.1_p20260722

Description

The GNU Compiler Collection

Added to portage

2026-07-27

gcc - 14.4.1_p20260723
Ebuild name:

sys-devel/gcc-14.4.1_p20260723

Description

The GNU Compiler Collection

Added to portage

2026-07-27

gcc - 15.3.1_p20260724
Ebuild name:

sys-devel/gcc-15.3.1_p20260724

Description

The GNU Compiler Collection

Added to portage

2026-07-27

gcc - 16.1.1_p20260725
Ebuild name:

sys-devel/gcc-16.1.1_p20260725

Description

The GNU Compiler Collection

Added to portage

2026-07-27

gcc - 17.0.0_p20260726
Ebuild name:

sys-devel/gcc-17.0.0_p20260726

Description

The GNU Compiler Collection

Added to portage

2026-07-27

geekbench-ai - 1.7.0
Ebuild name:

app-benchmarks/geekbench-ai-1.7.0

Description

A Cross-Platform AI Benchmark for Android, iOS, Linux, MacOS and

Added to portage

2026-07-27

git-sources - 7.2_rc5
Ebuild name:

sys-kernel/git-sources-7.2_rc5

Description

The very latest -git version of the Linux kernel

Added to portage

2026-07-27

gitpython - 3.1.57
Ebuild name:

dev-python/gitpython-3.1.57

Description

Library used to interact with Git repositories

Added to portage

2026-07-27

gnome-flashback - 3.58.0-r1
Ebuild name:

gnome-base/gnome-flashback-3.58.0-r1

Description

GNOME Flashback session

Added to portage

2026-07-27

herbstluftwm - 0.9.6-r1
Ebuild name:

x11-wm/herbstluftwm-0.9.6-r1

Description

A manual tiling window manager for X

Added to portage

2026-07-27

jupyterlab-desktop-bin - 4.6.2.1
Ebuild name:

sci-misc/jupyterlab-desktop-bin-4.6.2.1

Description

JupyterLab desktop application, based on Electron

Added to portage

2026-07-27

libGLw - 8.0.0-r2
Ebuild name:

x11-libs/libGLw-8.0.0-r2

Description

Mesa GLw library

Added to portage

2026-07-27

libxmp - 4.7.2
Ebuild name:

media-libs/libxmp-4.7.2

Description

Library that renders module files to PCM data

Added to portage

2026-07-27

libzia - 4.72-r1
Ebuild name:

dev-libs/libzia-4.72-r1

Description

Platform abstraction code for tucnak package

Added to portage

2026-07-27

mattermost-desktop-bin - 6.3.0_rc2
Ebuild name:

net-im/mattermost-desktop-bin-6.3.0_rc2

Description

Mattermost Desktop application

Added to portage

2026-07-27

nghttp3 - 1.18.0
Ebuild name:

net-libs/nghttp3-1.18.0

Description

HTTP/3 library written in C

Added to portage

2026-07-27

ngtcp2 - 1.25.0
Ebuild name:

net-libs/ngtcp2-1.25.0

Description

Implementation of the IETF QUIC Protocol

Added to portage

2026-07-27

phonenumbers - 9.0.35
Ebuild name:

dev-python/phonenumbers-9.0.35

Description

Python port of Google's libphonenumber

Added to portage

2026-07-27

prompt-toolkit - 3.0.53
Ebuild name:

dev-python/prompt-toolkit-3.0.53

Description

Building powerful interactive command lines in Python

Added to portage

2026-07-27

pygments - 2.20.0
Ebuild name:

dev-python/pygments-2.20.0

Description

Pygments is a syntax highlighting package written in Python

Added to portage

2026-07-27

pyproject-fmt - 2.25.4
Ebuild name:

dev-python/pyproject-fmt-2.25.4

Description

Format your pyproject.toml file

Added to portage

2026-07-27

svxlink - 26.05.1
Ebuild name:

media-radio/svxlink-26.05.1

Description

Multi Purpose Voice Services System, including Qtel for EchoLink

Added to portage

2026-07-27

typeguard - 4.6.0
Ebuild name:

dev-python/typeguard-4.6.0

Description

Run-time type checker for Python

Added to portage

2026-07-27

urwid - 4.0.8
Ebuild name:

dev-python/urwid-4.0.8

Description

Curses-based user interface library for Python

Added to portage

2026-07-27

xephem - 4.2.0-r1
Ebuild name:

sci-astronomy/xephem-4.2.0-r1

Description

Interactive tool for astronomical ephemeris and sky simulation

Added to portage

2026-07-27

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