How to use cal command in Linux

Опубликовано: 28 Июль 2026
на канале: Technical Junction
7,619
111

Linux Tutorial | cal command display the calendar for a specified month or for a year. It takes different options and three arguments. The default cal command without options and arguments displays the calendar of current month with highlighted date.

Syntax
cal [options] [date] [month] [year]

cal : Display the calendar of current month with highlighted date.

cal 2050 : Display the calendar of year 2050.

cal 3 2015 : Display the calendar of 3rd month i.e. March of year 2015.

cal 1 3 2015 : Display the calendar of March month of year 2015 and first day of month will be highlighted.

cal -3 : Display the 3 month’s calendar i.e. immediate previous month, current month and immediate next month.

cal –s : Display Sunday as first day of the week.

cal –m : Display Monday as first day of the week.

cal –y : Display the entire calendar of current year without mentioning the year.