Linux and Unix Cal command tutorial with examples

Command “cal” stands for calendar.
This command is used to see the calendar of a specific month/ year or both.
The basic syntax of command “cal”.

[month]- is used for specify month
[year] – is used for specify year

cal command to display calendar of current month

type “cal” command on terminal and press enter and output will be calendar of the current month

Output:

To see the calendar of specific month/Year [for example May 2021]

type below command in terminal.

Output:

To see the calendar of the specific year (all 12 months)


To see the calendar of the year 2012. Type “cal” command and attach desired year as shown below

Output

In output calendar of 2012(all 12 months) will display in the terminal.

cal command to  display the days of the year
Fig: Calendar for the year 2021

Display the calander for current year

Q: Display the previous, current and next month calendar of the year 1987 August

cal command to show  previous, current and next month calendar

Q: write a command to display the previous, current and next month calendar of the year 2015 december.

Q: What is the command to display the days of the year 2016

Read More

Linux and Unix rm command tutorial with examples
Linux and Unix mv command tutorial with examples
Linux and Unix tail command tutorial with examples

Reference

cal(1) – Linux man page
cal(1) — Linux manual page