Change the time and date in Linux

To change the time and the date, make sure you have root privileges :

To modify the time :

#date -s HH:MM:SS

To modify the date :

#date -s MM/DD/YYYY

If you want to know your BIOS timeĀ  and date :

#hwclock

To synchronize BIOS date and time with your system’s date and time :

#hwclock –systohc

Advertisements