Linux datetime

Linux December 8th, 2008

  1. su to root
  2. Find your timezone file under /usr/share/zoneinfo. For example:

  3. OPTIONAL: backup the current timezone configuration:

    cp /etc/localtime /etc/localtime.bak
  4. Create a symbolic link from the appropiate timezone to /etc/localtime.

    ln -sf /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
  5. Use rdate or ntpdate to set the system time (ntpdate is better):



  6. Set the hardware clock to the system time:

    /sbin/hwclock –systohc

Note: you may install ntp via yum if ntpdate does not exists on your system.


Copyright © 2008 iBiz Network Co., Ltd. Powered by wordpress, Theme by ericulous