How to Change the date and Time in Linux

“date” is the command used to manupulate the date and time of a linux system.
-s option used along with date command can be used to change the date and time

[root@nagios1 ~]# date
Sat May 10 11:17:41 IST 2014

Copy the above date output and modify to the date and time that needs to be set  and use along with the “-s” option with date command as below change the date.

[root@nagios1 ~]# date -s “Thu May 15 19:02:14 IST 2014”
Thu May 15 19:02:14 IST 2014
[root@nagios1 ~]# date
Thu May 15 19:02:16 IST 2014

 

Leave a Reply

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

*