Viewing Date, Time and Calendar in Linux terminal

Date in Terminal

Linux terminal is used for many advanced functions but let’s learn a few commands for fun that can display date, time and calendar.

Open the terminal in your favourite Linux distro and try the following command.

Date in Terminal

date: displays the date, day, time along with Time zone

cal: displays calendar of current month

cal 2020 : displays 2020 year calendar

cal Aug 2020: displays August month calendar of the year 2020

Example

[[email protected] ~]$ date
Wednesday 05 August 2020 12:31:26 AM IST
[[email protected] ~]$ date "+%A"
Wednesday
[[email protected] ~]$ date "+%D"
08/05/20
[[email protected] ~]$ date "+%T"
00:31:46
[[email protected] ~]$ cal
August 2020 
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

Author: Sulthan

Author, Blogger and Assistant Professor in Finance

Leave a Reply

Your email address will not be published. Required fields are marked *