Today I wanted to change date and time on one of my server quickly from command line. I am aware with command line options but every time I want to do it, I need to read man page or help to get perfect combination so i decided to write this small how to which can help me and you every time we want to change date and time in linux from command line.
Remember, CLI (command line interface) is most powerful for users / administrators like us.
To change system date in linux, type:-
For example: i want to change my system date to Dec 25 2009, 5.30pm, I will type:-
It’s simple, Isn’t it ?
MM – month
DD – day
YYYY – year
hh – hour is based on 24 hour
mm – minutes
ss – seconds
Hope this will help you.