Cal Command in Linux

Cal is a terminal command used in Linux to print a calendar. Simply type cal to display the current month calendar.

In this tutorial, we learn about cal command in Linux and its options.

syntax of cal command:

cal [options] [[[day] month] year]

If no arguments are provided the cal command displays the current month calendar with the current date highlighted.

cal command with no arguments

Options of cal command

Let's take a look at the options of cal command and its outputs.

01. To show the calendar of a specific month of the year - for example, "September 2021".

cal 09 2021

02. To show calendar for the current whole year with the current date highlighted:

cal -y
show calendar for whole year

03. You can display the whole calendar for a specific year, type:

cal 2020
show calendar specific year

04. You can display the calendar of previous, current (along with current date highlighted) and next month, type:

calendar of previous, current and next month

05. If you wish to display the calendar for the current month and next two months, type

cal -A 2

vice versa

cal -B 2

06. Using cal command you can display the current month in the Julian calendar. Also its highlights the current Julian date.

cal -j
Julian calendar


In this tutorial, we covered cal command in Linux and its options. Thanks for reading.

Leave a Comment