How to set time in linux


While logged in as root do the following:

  1. Type "date".
  2. You should see some variation of"

    "Wed Nov 24, 9:29:17 EST 1999"

  3. To change the time type(as an example):

    date -s 10:10

  4. The system response will be:

    "Wed Nov 24, 10:10:02 EST 1999"

  5. Then if you want to set the hardware(BIOS) clock so the system will keep the time when it reboots type:

    clock -w

    or

    setclock

 

The program setclock will set your hardware clock based on your system configuration parameters including whether or not your clock is set to universal time.


dpejic has written 84 articles

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>