Wednesday, 18 December 2013

How to set date and time from command prompts on Linux.

When we don't have GUI installed on Linux system, It is difficult to set the system date and time from the command prompt. Use the date command to display the current date and time.

You must login as root user to use date command.

Set Date and Time on Linux:
use the following syntax to set new date and time:
#date --set="STRING"

For example, set new data to 18 DEC 2013 16:40:00, type the following command as root user:

#date -s "18 DEC 2013 16:40:00"

OR

#date --set="18 DEC 2013 16:40:00"

For any query please feel free to contact me my email ID is sashwatkatore@gmail.com

No comments:

Post a Comment