Skip to content

How to use cal command in linux

5 February 2024
How to use cal command in linux


In Linux, the ‘cal‘ command is a simple utility used to display a calendar. It can be run from the command line interface in a terminal. By default, it displays the current month’s calendar. However, you can specify a month and year to view the calendar for that particular month.

Here are some examples of using thecalcommand:

To display the current month’s calendar:

cal

To display a specific month’s calendar, specify the month and year:

cal MM YYYY

For example:

cal 2 2024

This command will display the calendar for February 2024.

You can also display a whole year’s calendar by specifying only the year:

cal YYYY

For example:

cal 2024

This command will display the calendar for the entire year 2024.

The cal’ command provides a simple way to quickly check the calendar without needing a graphical user interface or a separate application. It’s particularly useful for system administrators or users who prefer working primarily from the command line.