How to change the system date in Linux

A friend needed help changing the system date on his Linux box today. This is usually a simple task for Linux users but newbies tend to get confused by the "date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]" line in the man page.

To simplify, this is how you do it.

Set the current date to April 7 2008 8:42:45pm.

The easy way,

#date -s "7 April 2008 20:42:45"

The harder way,

#date 040720422008.45

The break down: MM DD hh mm YYYY ss

MM = month = 04

DD = day = 07

hh = hour = 20

mm = minute = 42

YYYY = year = 2008

ss = second = 450

sample output,

[root@klmsyslog01p ~]# date -s "7 April 2008 20:42:45"
Mon Apr 7 20:42:45 MYT 2008
[root@klmsyslog01p ~]#

[root@kmmserver01p ~]# date 040720422008.45
Mon Apr 7 20:42:45 MYT 2008
[root@kmmserver01p ~]#

  • Hi! I’m looking for both SEO and Linux admin help. If you are interested, please hit me up here! Also, if anyone knows of any open source solutions like the one located at http://www.trickylinux.com, I’d love to know about it!Thanks!Steven

  • To change system date in linux, type:-

    [root@akwal]# date MMDDhhmmYYYY.ss

    For example: i want to change my system date to April 10 2012, 3.30pm, i will type:-
    [root@akwal]# date 041015302012

    As Clearly
    [root@akwal]# date 041015302012.00

    for more help
    http://attaakwal.blogspot.com/2012/04/how-to-change-time-and-date-in-linux.html

  • mohan

    adsfasdfasdfdf

  • mohan

    asdfasdfasdfasdfasdf

© 2008-2012 The Danesh Project
Powered by Wordpress and made by Guerrilla. Hosted at ServerFreak