Set Date and time via command line

You can translate the content of this page by selecting a language in the select box.

AI Unraveled: Demystifying Frequently Asked Questions on Artificial Intelligence

Let’s find out how to set Date and time via command line on linux and windows:

Achieve AWS Solutions Architect Associate Certification with Confidence: Master SAA Exam with the Latest Practice Tests and Quizzes illustrated

  • On Linux via terminal

    System time (Must have sudo privilege)
    date -s ‘2015-07-28 15:27:30’
    Hardware time
    Let’s set the hardware clock to the current system time:
    hwclock –systohc

  • On Windows via command prompt terminal

    System time (Must have Administrator privilege)
    The current date is: 07/28/2015
    Enter the new date: (mm-dd-yy)_
    The current time is: 15:34:03.44
    Enter the new time: _

error: Content is protected !!