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:
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 Commands Options
To display a specific month of the year, follow the syntax:
For example, if I want to print the month of “July 2020,”. I will type it in the following way:
You can also display the whole calendar of a specific year in the terminal:
To print a calendar of the current year, type:
If you want to print the current month with the previous and the next one, use the below-mentioned command:
Conclusion
“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.