There is a way to change Ubuntu's system time in the GUI Date & Time Settings, however, as with most tools, I'm assuming that is just a front-end for one of Ubuntu's command-line tools.

What commands does Ubuntu use to get or set the system time? Can these be used in Bash scripts, or are they limited to only be executable by the system?

1 Answer 1


Read the date man page

To set the system date to January 2, 1970 10:34:56 am

sudo date 010210341970.56 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.