🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

cal Command

Beginner System Information man(1)

Display a calendar in the terminal

👁 11 views 📅 Updated: Mar 15, 2026
SYNTAX
cal [OPTION]... [MONTH] [YEAR]

What Does cal Do?

cal displays a calendar in the terminal. Without arguments, it shows the current month. It can display specific months, entire years, and supports various calendar systems.

cal is a quick reference tool for checking dates, day-of-week, and planning. It highlights today date in the current month display.

cal is simple but useful — it is faster than opening a GUI calendar application, works over SSH, and is available on virtually all Unix/Linux systems.

Options & Flags

OptionDescriptionExample
(no args) Show current month cal
YEAR Show entire year cal 2024
MONTH YEAR Show specific month cal 3 2024
-3 Show previous, current, and next month cal -3
-y Show current year cal -y
-j Show Julian days (day of year) cal -j

Practical Examples

#1 Current month

Shows the current month with today highlighted.
$ cal
Output: January 2024\nSu Mo Tu We Th Fr Sa\n 1 2 3 4 5 6\n 7 8 9 10 11 12 13\n14 15 16 17 18 19 20

#2 Three months

Shows previous, current, and next month side by side.
$ cal -3

#3 Full year

Shows all 12 months of 2024.
$ cal 2024

#4 Specific month

Shows December 2024.
$ cal 12 2024

#5 Julian days

Shows day-of-year numbers instead of day-of-month.
$ cal -j

#6 Check a date

Shows July 1969 — the month of the moon landing.
$ cal 7 1969

Tips & Best Practices

Quick date lookup: Need to know what day of the week a date falls on? cal MONTH YEAR shows it instantly.
ncal alternative: ncal shows weeks in columns (Monday-Sunday) instead of rows, which some people find more readable.
Gregorian calendar: cal shows the Gregorian calendar. Historical dates before 1582 may show differently depending on your locale.

Frequently Asked Questions

How do I see the calendar for a specific month?
cal MONTH YEAR. For example: cal 6 2024 shows June 2024.
How do I see a full year calendar?
cal YEAR shows all 12 months. cal -y shows the current year.
How do I see three months at once?
cal -3 shows the previous, current, and next month side by side.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →