Dave's Brain

Browse - Computer Tips - How do I set the time in the command line?

Date: 2014jun18
OS: Linux
Level: beginner
Importance: important

Q.  How do I set the time in the command line?

A.  With the "date" command:

date -s 1103 for 11:03 AM
Don't forget to use 24-hour time:
date -s 1355 for 1:55 PM
You can also the date with this command.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.