Cal command in Linux/Unix

cal command is used in Linux to display the calender for a specific month or for a whole year in the terminal.

Syntax of cal command

cal [Month[Year]]

Installing cal command

Before installing the cal command, you should check whether the cal command is already installed or not. Write cal in the terminal and hit Enter

cal
install cal command in Linux
sudo apt install ncal

Using cal command

Just using cal command in terminal, will display the current month’s calendar.

cal

cal command in linux

Display the current year’s calendar

Use call command with -y option to display the current year’s calender.

cal -y

cal -y command in linux

Displaying any particular month of the current year’s calendar

To display any particular month of the current year, use cal command with -m option followed by month’s name.

cal -m <month'sNamme>
cal -m August

cal -m month command in Linux

Display any particular month and year’s calendar

cal Month's_in_MM Year'sYYY
cal 11 2022

cal month Year command in Linux

cal -m Month's_Name Year_in_YYYY
cal -m January 2018

Display whole year’s calendar

cal 2023

cal Year command in Linux

Display the previous month, current month and next month’s  calender

cal -3

cal -3 command in Linux

Display the current month’s in Julian’s calendar

cal -j

cal -j command in Linux

Display current year in Julian calendar

cal -jy

cal -jy command in Linux

 

Sharing is Caring
Scroll to Top