Linux Commands

Linux Cal Command Tutorial

In Linux and Unix-like systems, the “cal” command is a command-line utility used to print calendars on the terminal. “Cal” is an abbreviated form of Calendar.

It is a pretty simple command and doesn’t contain many options. There are few options to display year, month, or date on the console.

How to Install Cal Utility on Ubuntu 20.04

To install the “cal” command on Linux operating system, launch the terminal and type the following command:

$ sudo apt install ncal

After installing the “cal” command tool in your system, you can use the “cal” command in a terminal. It will show you the current month as depicted in the output image:

$ cal

Cal Commands Options

To display a specific month of the year, follow the syntax:

$ cal {month}{year}

For example, if I want to print the month of “July 2020,”. I will type it in the following way:

$ cal 07 2020

You can also display the whole calendar of a specific year in the terminal:

$ cal 2020

To print a calendar of the current year, type:

$ cal –y

If you want to print the current month with the previous and the next one, use the below-mentioned command:

$ cal -3


Cal” command is a quite helpful command used to display a calendar on the terminal in Linux and Unix- like systems. The guide has explained to you how to install the “cal” command utility in the Linux system, and it’s working with few examples.

About the author


Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.