Command To Change Date And Time In Linux


FREQUENTLY ASKED QUESTIONS (Linux)
Q: How to set/change current date and time in linux terminal ?


The "date" command is used to display and change the current system time/date in linux. To change current system time in linux via terminal commands, login as super user(root) and run the below commands. This commands should work on all RPM based linux like CentOS,Fedora,etc.


Show current Date and Time
[root@server ~]# date
Thu Apr  5 11:21:56 IST 2012

Change current Linux Date and Time
Change current  time to 2012 April 5 11:25:00
[root@server ~]# date -s "5 Apr 2012 11:25:00"
Thu Apr  5 11:25:00 IST 2012
OR
Syntax: #date MMDDHHMMYYYY
MM-Month, DD-Date, HH-Hour, MM-Minute, YYYY-Year
[root@server ~]# date 040511252012   
Thu Apr  5 11:25:00 IST 2012                             


Check Related Posts:

Was this helpfull ?

1 comments:

Mohamed Aarous said...

Thank You Alot For This Tutorial It work's For Me!!!

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons