How to set date and time in Linux Machine/Server

Login in machine as a root user and run the below command.

[root@localhost ~]# date -s "14 dec 2003 14:15:16"

Where,

-s=set
14 dec 2003=Date you want set (14=Date, dec=Month & 2003=Year)
14:15:16:=Time you want to set (14=Hr, 15=Min & 16=Sec)

No comments:

Post a Comment