How to View and Set the Time and Date in Linux?

The date command in Linux is used to display the current day, date and time, if the date command is used with –u attribute then it display the Greenwich Mean Time zone. Changes in date and time can be done through the date command with –s attribute it can be only possible if you have the super user privileges in Linux.

Here are some examples

date Print the date and time.

Sat Nov 2 22:09:46 EST 2009

date -u Print the GMT date and time.

Sun Nov 3 07:09:49 GMT 2009

date -s

0503 Set the clock to 5:03 A.M.

Be Sociable, Share!

Leave a Reply