Setting system clock and date

Posted on March 11th, 2008 in Basics, Commandline Tools, Linux+ by admin

To set system clock and date using command, date command can be used.
This is how to do it:

date mmddttttyyyy.ss

where:

  • mm - month
  • dd - day
  • tttt - time in hours and minutes
  • yyyy - year
  • ss - seconds

For example, to set the current date to 11 March 2008, 12:00 a.m., this command below can be used:

date 110312002008

To see the current date, the date command without argument can be used.

date

Post a comment