How To Set Date and Time in Unix

In Unix/Linux, the date command displays and set the current day, date, time, and year.

To check the current date and time, write date command on unix console

[root@localhost ~]# date

Thu Jun 16 09:03:22 CDT 2016

Set/Change Date and Time

You must be login as root to change date under UNIX.

Syntax to set date and time

date MMddhhmm[[cc]yy]


MM : Month (two-digit numeric month)
dd : Day (two-digit numeric day i.e. day of month)
hh : Hour
mm : Minutes (30)
cc : First two digits of the year (10)
yy : Last two digits of the year (2010).

To set date to Dec 15, 2012 9:00am

[root@localhost ~]# date 121509002012

Please follow and like us:

You may also like...

Leave a Reply

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

Time limit is exhausted. Please reload the CAPTCHA.