How to Set a Unix Date
The Unix "date" command is used to view or set the system date on the Unix and Linux operating systems. The "-s" option is used to set the system date. This option is followed by a string representing the new system date. You can set the date down to the second. If you omit the time, the date command will fill the time with zeros, which will set the time to midnight of the date provided.
Instructions
-
-
1
Open a terminal window or log into a terminal session.
-
2
Type the command "date -s "MM/DD/YYYY HH:MM:SS"" to set the date. Replace "MM/DD/YYYY HH:MM:SS" with the date and time in the format "month/day/year hour:minute:seconds". For example, to set the date to October 10, 2010 12:23:32, type the command "date -s "10/10/2010 12:23:32"".
-
-
3
Type the command "date" to view the changed date.
-
1