How to install and configure NTP on Sabayon 5

Sabayon 11 KDE Classic Menu

Sabayon 5Sabayon is a Gentoo-based, GNU/Linux distribution. The latest version, Sabayon 5, was released on October 2, 2009. The GNOME edition was just reviewed here. One thing I pointed out in that review is that the NTP (Network Time Protocol) package is not installed by default. This post provides a step by step guide on how to install and setup NTP on Sabayon 5.

NTP is the protocol that allows a networked device to sync it’s clock with that of NTP servers on the Internet. It allows your computer’s clock to be accurate, atomic-clock accurate.

Step one is to launch Sulfur, Sabayon’s graphical package manager, from the menu (System > Administration > Sulfur) or by double-clicking Sulfur’s icon on the desktop. Make sure that the “Available” tab is selected, and type in “ntp” into the search box. From the search results, right-click on the NTP package and select “Install”. Then click on the Installation tab to see the packages that are going to be installed.

Related Post:  How to configure disk encryption on Sabayon 5.2

Searching for the NTP package

The Installation tab shows that two packages will be installed. Click on the Commit Actions button to start installation.

When the installation is completed, you will find two scripts related to NTP under the /etc/init.d directory. These are the ntp-client and ntpd scripts. ntpd is used to maintain time on a running system. It is automatically started after installation. ntp-client is used to set time at boot. Unlike ntpd, you’ll have to manually start it. To do that, launch a shell terminal (Applications > Accessories > Terminal), su to root, and type /etc/init.d/ntp-client start as shown in the screenshot below.

Starting ntp-client

With that out of the way, now we are ready to set up the system to use NTP. Launch the Time and Date utility from the menu (System > Administration > Time and Date). Click on the Unlock button to gain the rights needed to change the system’s time.

Related Post:  How to disable Taskbar Thumbnails in KDE

Time and Date utility
Date and Time utility

With the Time and Date utility unlocked, you’ll notice that by default, the system sets its time manually. Click on the Configuration dropdown and select “Keep synchronized with Internet servers”. Make sure that your timezone is correctly selected.

mode selection

With NTP selected as the mode for setting time, the next screen presented allows you to select NTP servers to use. By default, four NTP servers are pre-selected, so you do not really need to do anything here.

NTP selected

The NTP servers pre-selected by the system. You may chose to de-select those and choose the NTP servers that you prefer to use.

Selecting NTP servers

That is all it takes to install and set up a Sabayon system to use NTP to set system clock.

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.

Upcoming events

3 Responses

  1. In this tutorial you start the ntp-client manually by using the command:

    # /etc/init.d/ntp-client start

    However that command would not cause ntp-client to be started automatically when you reboot; it only starts ntp-client for the current session.

    Don’t you also have to add net-client to the default runlevel so that it starts automatically when you next boot?:

    # rc-update add ntp-client default

    Or does using ‘Kickoff > Computer > System Settings > Date & Time’ to configure KDE 4 to synchronise automatically with an NTP time server add ntp-client to the default runlevel for you?

    1. Having now configured a couple of PCs to sync their system clock by using NTP, I can answer my own question regarding ntp-client:

      Although I have read on some sites that /etc/init.d/ntp-client should be added to the default runlevel in order to read the time from an NTP server (once-only, during start-up), this in fact does not work because usually the network connection is not up by the time the ntp-client initscript runs. Some solutions to this problem are given in the Sabayon Linux Forums thread http://forum.sabayon.org/viewtopic.php?f=59&t=15119

      If you are using NetworkManager on your PC, an elegant solution is to use NetworkManagerDispatcher to restart ntp-client in order to resync your system clock every time a network connection comes up. Another way is to create a cronjob to run the ntpdate command or the “/etc/init.d/ntp-client restart” command. Yet another way (a ‘quick-and-dirty’ solution) is to delay running ntp-client until the network is up after boot by putting e.g. “sleep 10s && /etc/init.d/ntp-client restart” in /etc/conf.d/local.

      Regarding the NTP daemon, it is possible to set this to run at start-up from the command line rather than via a Desktop Environment GUI. The command:

      # rc-update add ntpd default

      will add the daemon’s initscript to the default runlevel so that it is run automatically at next startup, and the command:

      # /etc/init.d/ntpd start

      will start the daemon running right now.

      If you make clock_systohc=”YES” in the file /etc/conf.d/hwclock then the time in the system clock will be written to the BIOS (CMOS) clock (a.k.a. hardware clock) when you shut down your PC. Sabayon Linux has the file configured this way by default.

      Note that, by default, the NTP daemon won’t correct, all in one go, a time difference between your system clock and the remote NTP server if that difference is above a certain size. However, if you want to override the default behaviour, i.e. allow the NTP daemon to make a large first adjustment to the system clock, you can set the environment variable NTPD_OPTS in the /etc/conf.d/ntpd file as follows:

      NTPD_OPTS=”-g”

      This would mean that you would not need to run ntp-client before ntpd. However, if you run ntp-client automatically — either once after start-up or periodically — then that would be good enough for the typical desktop user and could be an alternative to having a continuously-running NTP daemon. Nothing stops you doing both if you want, of course.

      1. Thank you. For something this detailed, perhaps you should post it in the forum.

        Btw, running NTP is not as involved on a Debian-based system. It just works.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.

Categories
Archives

The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.