Have you ever wondered how to set date and time on a linux box?
Have you ever wondered how to set date and time on a linux box?
  [ Enlarge Image ]  
 
 
<< Back 
Posted: 2005/10/31 by: fcruz. Linux - Unix Blogs.
I usually tend to forget the order of the parameters on the date command, is not a command you will use regularly, but definitely its a must know for any network administrator on a linux/unix environment. Check out this simple instructions:

Run the date command to make sure you have the correct time:

[root@server /root]# date
                                                               
Thu Sep 20 11:00:06 CDT 2001
[root@server /root]#

If you have the wrong timezone set, use "timeconfig" or "linuxconf" to set the correct timezone.

If your timezone is correct but the date and/or time needs updating, the following commands will update the date and time. The second command is needed in order to push the date and time into the PC clock.

[root@server /root]# date 092011082001
                                                
Thu Sep 20 11:08:00 CDT 2001
[root@server /root]# hwclock --utc --systohc
[root@server /root]#





[ Back ]