How To Set Date And Time In Linux Command?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To set the date and time in Linux, you can use the timedatectl command. Syntax for this command is as follows:
timedatectl [OPTIONS] COMMAND where COMMAND is one of the following:
set–time:
sets the system clock to the specified time set–timezone:
sets the system timezone to the specified timezone set–local–rtc:
sets the system’s local hardware clock to the specified local time For example, to set the system time to 4:00pm on October 14th, 2020, use the following command: timedatectl
set–time “2020–10–14 16:00:00“