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@lab ~]# date
Thu July 5 07:21:56 IST 2013
Change current Linux Date and Time
Change current time to 2013 July 5 07:25:00
[root@lab ~]# date -s "5 July 2013 07:25:00"
Thu July 5 07:25:00 IST 2013
OR
Syntax: #date MMDDHHMMYYYY
MM-Month, DD-Date, HH-Hour, MM-Minute, YYYY-Year
[root@server ~]# date 070507252013
Thu July 5 7:25:00 IST 2013
Syntax: #date MMDDHHMMYYYY
MM-Month, DD-Date, HH-Hour, MM-Minute, YYYY-Year
[root@server ~]# date 070507252013
Thu July 5 7:25:00 IST 2013
Good Luck!
0 comments:
Post a Comment