On Unix-like operating systems, the cal and ncal commands display a formatted calendar in the terminal.
Description
By default, the calendar displayed by cal looks like this:
Description
Syntax
Options
Examples
Related commands
Linux commands help
April 2019
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
The ncal (“new cal”) command provides the same functions of cal, but it can display the calendar vertically (with weeks in columns). On systems with ncal installed, cal is often a symbolic link to ncal. It behaves like the original cal if you use the name cal to run the program.
If no options are specified, cal and ncal display the current month, with the current day highlighted.
Syntax
cal [month] [year] [-m month] [-y year] [-h] [-3] [-1] [-A num] [-B num] [-d YYYY-MM] [-j] [-N]
ncal [month] [year] [-m month] [-y year] [-h] [-3] [-1] [-A num] [-B num] [-d YYYY-MM] [-J] [-C] [-e] [-o] [-p] [-w] [-M] [-S] [-b]
Options
The following options are available in both cal and ncal:
Options: cal
The following options are available only in cal:
Options: ncal
The following options are available only in ncal:
Examples
cal
Display the calendar for this month, with today highlighted.
cal -h
Same as the previous command, but do not highlight today.
cal -3
Display last month, this month, and next month.
cal -y
Display this entire year’s calendar.
cal -y 2000
Display the entire year 2000 calendar.
cal 2000
Same as the previous command.
cal -m December
Display the calendar for December of this year.
cal -m Dec
cal -m 12
Same as the previous two commands.
cal 12
Same as the previous three commands.
cal 12 2000
Display the calendar for December 2000.
ncal
Display this month’s calendar, with weeks arranged vertically rather than horizontally.
ncal -y
Use a vertical calendar representation, displaying the entire year.
Related commands
calendar — Display appointments and reminders.