Setting system clock and date

terminal-glossy.jpg

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

To save the  time so your changes don’t go away at reboot, run:

 hwclock --systohc

No Posts Found

Comments are closed.