Cal Command: How to Display Calendar in Linux Terminal

In this article. I will show you how to use the cal command in Linux to quickly display the calendar in the terminal.

The cal command is built into most Linux distributions. If it’s not installed, and you’re using Ubuntu or Debian-based systems, install it with the following command:

sudo apt install ncal

For Fedora, CentOS, and Red Hat, install the cal command using the following command:

sudo dnf install cal

To display the calendar open the Linux terminal and type cal:

cal
cal command in linux

It will show the current month with the current date highlighted. However, on Ubuntu and Debian-based systems, the date may not be highlighted. If that happens, use the ncal command instead.

ncal

Using the -3 option will display the calendar for the previous and next months as well:

cal -3
Display Calendar in Linux

Display the Calendar for a Specific Month or Year

To display the calendar for a specific month, use the -m option followed by the month's name or number:

cal -m jan
cal -m 1

Using the -y option will display the calendar for the entire year.

cal -y
Display the Calendar for a Specific Month or Year

To display the calendar for a specific year, provide the year with the -y option. For example, the following command will show the calendar for the year 2026:

cal -y 2026

Finally, to display the calendar for a specific month of a specific year, type cal followed by the month and the year, without any options.

cal may 2026

And that’s how you can print the calendar in the Linux terminal using the cal command. I hope you found it helpful.