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:

87889

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-23
ggml - 0.21.0-r1
Ebuild name:

sci-ml/ggml-0.21.0-r1

Description

Tensor library for machine learning

Added to portage

2026-08-23

2026-08-22
asteval - 1.0.10
Ebuild name:

dev-python/asteval-1.0.10

Description

Evaluator of Python expression using ast module

Added to portage

2026-08-22

boto3 - 1.43.78
Ebuild name:

dev-python/boto3-1.43.78

Description

The AWS SDK for Python

Added to portage

2026-08-22

botocore - 1.43.78
Ebuild name:

dev-python/botocore-1.43.78

Description

Low-level, data-driven core of boto 3

Added to portage

2026-08-22

brotlicffi - 1.2.0.2
Ebuild name:

dev-python/brotlicffi-1.2.0.2

Description

Python binding to the Brotli library

Added to portage

2026-08-22

cachelib - 0.16.1
Ebuild name:

dev-python/cachelib-0.16.1

Description

Collection of cache libraries in the same API interface. Extracted from

Added to portage

2026-08-22

cfg-update - 1.11.0
Ebuild name:

app-portage/cfg-update-1.11.0

Description

Easy to use GUI & CLI alternative for etc-update

Added to portage

2026-08-22

cgreen - 1.7.0
Ebuild name:

dev-libs/cgreen-1.7.0

Description

Unit test and mocking framework for C and C++

Added to portage

2026-08-22

charm - 6.10.2
Ebuild name:

sys-cluster/charm-6.10.2

Description

Message-passing parallel language and runtime system

Added to portage

2026-08-22

cjose - 0.6.2.8
Ebuild name:

dev-libs/cjose-0.6.2.8

Description

C library implementing the Javascript Object Signing and Encryption (JOSE)

Added to portage

2026-08-22

confuse - 3.4
Ebuild name:

dev-libs/confuse-3.4

Description

a configuration file parser library

Added to portage

2026-08-22

cramjam - 2.12.0
Ebuild name:

dev-python/cramjam-2.12.0

Description

Thin Python bindings to de/compression algorithms in Rust

Added to portage

2026-08-22

cython - 3.3.0
Ebuild name:

dev-python/cython-3.3.0

Description

A Python to C compiler

Added to portage

2026-08-22

dbutils - 3.2.0
Ebuild name:

dev-python/dbutils-3.2.0

Description

Database connections for multi-threaded environments

Added to portage

2026-08-22

dealii - 9.8.0
Ebuild name:

sci-libs/dealii-9.8.0

Description

Solving partial differential equations with the finite element method

Added to portage

2026-08-22

dependency-groups - 1.3.2
Ebuild name:

dev-python/dependency-groups-1.3.2

Description

A tool for resolving PEP 735 Dependency Group data

Added to portage

2026-08-22

faker - 40.37.0
Ebuild name:

dev-python/faker-40.37.0

Description

A Python package that generates fake data for you

Added to portage

2026-08-22

fwupd - 2.1.7
Ebuild name:

sys-apps/fwupd-2.1.7

Description

Aims to make updating firmware on Linux automatic, safe and reliable

Added to portage

2026-08-22

libcap-ng - 0.9.5-r1
Ebuild name:

sys-libs/libcap-ng-0.9.5-r1

Description

POSIX 1003.1e capabilities

Added to portage

2026-08-22

libplatform - 2.2.0
Ebuild name:

dev-libs/libplatform-2.2.0

Description

Platform support library used by libCEC and binary add-ons for Kodi

Added to portage

2026-08-22

libsecret - 0.21.7
Ebuild name:

app-crypt/libsecret-0.21.7

Description

GObject library for accessing the freedesktop.org Secret Service API

Added to portage

2026-08-22

libsecret - 0.21.7-r1
Ebuild name:

app-crypt/libsecret-0.21.7-r1

Description

GObject library for accessing the freedesktop.org Secret Service API

Added to portage

2026-08-22

libxmlb - 0.3.29
Ebuild name:

dev-libs/libxmlb-0.3.29

Description

Library to help create and query binary XML blobs

Added to portage

2026-08-22

mac - 13.26
Ebuild name:

media-sound/mac-13.26

Description

Monkey's Audio Codecs

Added to portage

2026-08-22

mesa - 26.2.1
Ebuild name:

media-libs/mesa-26.2.1

Description

OpenGL-like graphic library for Linux

Added to portage

2026-08-22

mesa_clc - 26.2.1
Ebuild name:

dev-util/mesa_clc-26.2.1

Description

mesa_clc tool used for building OpenCL C to SPIR-V

Added to portage

2026-08-22

nanobind - 3.0.0
Ebuild name:

dev-python/nanobind-3.0.0

Description

Tiny and efficient C++/Python bindings

Added to portage

2026-08-22

ncspot - 1.4.0
Ebuild name:

media-sound/ncspot-1.4.0

Description

ncurses Spotify client written in Rust using librespot

Added to portage

2026-08-22

nss - 3.127
Ebuild name:

dev-libs/nss-3.127

Description

Mozilla's Network Security Services library that implements PKI support

Added to portage

2026-08-22

openpgp-keys-zsh - 2026.07.12
Ebuild name:

sec-keys/openpgp-keys-zsh-2026.07.12

Description

PGP keys used to sign ZSH releases

Added to portage

2026-08-22

portage - 3.0.82
Ebuild name:

sys-apps/portage-3.0.82

Description

The package management and distribution system for Gentoo

Added to portage

2026-08-22

portalocker - 4.2.0
Ebuild name:

dev-python/portalocker-4.2.0

Description

A library for Python file locking

Added to portage

2026-08-22

powercap-utils - 0.6.0
Ebuild name:

sys-power/powercap-utils-0.6.0

Description

C bindings to the Linux Power Capping Framework in sysfs

Added to portage

2026-08-22

rss2email - 3.14-r4
Ebuild name:

net-mail/rss2email-3.14-r4

Description

A python script that converts RSS/Atom newsfeeds to email

Added to portage

2026-08-22

sabctools - 9.7.0
Ebuild name:

dev-python/sabctools-9.7.0

Description

Module providing raw yEnc encoding/decoding for SABnzbd

Added to portage

2026-08-22

scipy - 1.18.1
Ebuild name:

dev-python/scipy-1.18.1

Description

Scientific algorithms library for Python

Added to portage

2026-08-22

shadowsocks-libev - 3.3.6
Ebuild name:

net-proxy/shadowsocks-libev-3.3.6

Description

A lightweight secured SOCKS5 proxy for embedded devices and low e

Added to portage

2026-08-22

sphinx-argparse - 0.6.1
Ebuild name:

dev-python/sphinx-argparse-0.6.1

Description

Sphinx extension that automatically documents argparse commands an

Added to portage

2026-08-22

spidermonkey - 140.14.0
Ebuild name:

dev-lang/spidermonkey-140.14.0

Description

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

Added to portage

2026-08-22

spidermonkey - 153.1.0
Ebuild name:

dev-lang/spidermonkey-153.1.0

Description

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

Added to portage

2026-08-22

spirv-llvm-translator - 24.0.0_pre20260820
Ebuild name:

dev-util/spirv-llvm-translator-24.0.0_pre20260820

Description

Bi-directional translator between SPIR-V and LLVM

Added to portage

2026-08-22

symbols-nerd-font - 3.5.1
Ebuild name:

media-fonts/symbols-nerd-font-3.5.1

Description

Symbols-only font containing the Nerd Font icons

Added to portage

2026-08-22

tree-sitter-cmake - 0.7.4
Ebuild name:

dev-libs/tree-sitter-cmake-0.7.4

Description

CMake grammar for tree-sitter

Added to portage

2026-08-22

tree-sitter-ocaml - 0.25.0
Ebuild name:

dev-libs/tree-sitter-ocaml-0.25.0

Description

OCaml grammar for Tree-sitter

Added to portage

2026-08-22

tree-sitter-scala - 0.26.2
Ebuild name:

dev-libs/tree-sitter-scala-0.26.2

Description

Scala grammar for Tree-sitter

Added to portage

2026-08-22

wine-proton - 11.0.2
Ebuild name:

app-emulation/wine-proton-11.0.2

Description

Valve Software's fork of Wine

Added to portage

2026-08-22

wine-vanilla - 11.16
Ebuild name:

app-emulation/wine-vanilla-11.16

Description

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

Added to portage

2026-08-22

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