Setting the Date and Time

Setting the date and time is very important for a system administrator. Why? Because if you find something inappropriate or possibly problematic in your log files (e.g., repeated unsuccessful login attempts from a specific location), you want to be able to accurately cross-reference your log files with the log files of your colleagues at the other location. That can happen only if the time on both hosts is pretty close to accurate.

To Set the Time with ntpdate:

  • sudo /usr/sbin/ntpdate 192.168.96.3

    Use ntpdate with the name of a time server (currently available servers are listed at www.ntp.org) to update your system clock to the current, accurate time (Code Listing 16.7). If you get an error message about the socket ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.