Changing the date and time from the Linux Desktop is very easy. Usually all you need to do is right click on the Desktop clock and choose Adjust Date & Time. In case we are using a non GUI environment like Ububtu server we need to use the command line for that.

Using the Linux date command to display the current date and time

If we want to view the current date and time using a command line all we need to do is to execute the Linux date command:$ dateThu Jul 10 08:37:02 BST 2008

We can see that the date is the 10th of July 2008 ,the time is 8:37 and the time zone is the British summer time.We can view the universal time using the -u option$ date -uThu Jul 10 07:37:02 UTC 2008

Changing the date and time in Linux using the date command

If we want to change the date and time we can use the same command with the addition of the new date and/or time$ date 071009372008.00