BIOS,Windows, Linux, Software,Security, Domains, Web Hosting

How to Set Date Time in Linux

If we have no any GUI installed or have no network connection in our linux system with inaccurate time, what can we do to update date and time ? Yes, there are  also ways for us.

Date command is very useful for viewing and date time update in a shell prompt. First of all, you may need to be a root user. So if you are using Ubuntu with common user, "sudo" needs to be added in front of the command.

1. View the current date/time

View the system date/time:


For more usage:

#date --help

View the hardware clock:

#hwclock -r

2. Set date to 20140718

#date -s 18/07/2014

3. Set time to 10:12:15

#date -s 10:12:15

4. Write the system time to hardware clock

#hwclock -w

5. Reboot to check it again

If your date/time has been changed again by some other reasons, please attention if the battery is low.


Related Articles


Leave a Reply

Subscribe to BootBeta Comments RSS feed to receive notification of latest comments posted.


  • Enter Email Address:

Recent Post

Copyright@ 2010-2014 Bootbeta All Rights Reserved.
HooBlog Ver 1.5 Build 20140530