When should you use cal command?

The cal command in Linux is a utility that displays a calendar in the terminal. It is particularly useful for quickly viewing the days of a month, finding out what day of the week a specific date falls on, or viewing a complete year at a glance. Here are some scenarios when you might want to use the cal command:

  • To check a specific date's day of the week.
  • To view the calendar for the current month or any other month and year.
  • For quick reference without needing a graphical interface.
  • When scripting tasks that require date information.

Example Usage

Here’s how you can use the cal command:

cal 2023

This command will display the calendar for the entire year of 2023.


cal command Linux calendar terminal utility view calendar check dates