This simple tutorial is going to show Ubuntu beginners how to display and change date and time on Ubuntu Linux both Server and Desktop.
To display data and time, use date command:
date
Sample output:
Wed Jul 3 20:59:28 CST 2013
To display calendar, use cal command:
cal
Sample output:
July 2013
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
To change date and time:
sudo date -s "4 June 2020 18:00:00"