• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Use Calendar Command in Ubuntu Linux

How to Use Calendar Command in Ubuntu Linux

By Sourabh / October 7, 2020 Category: How To, Ubuntu

Learn how to use calendar command in Ubuntu Linux. Here are the examples of how to use cal command in Unix/Linux and ncal command in Unix/Linux Systems.

Calendar Command in Ubuntu Linux

The cal utility displays a simple calendar in traditional format.

Calendar Command Options

-m: Display monday as the first day of the week.
-j: Display julian dates (days one-based, numbered from January 1).
-y: Display a calendar for the current year.

ncal Command in Linux

You can also use ncal command in Linux systems. It is similar to cal command, but it displays a calendar and the date of Easter.

The ncal utility displays an alternative layout, more options and the date of Easter. The new format is a little cramped but it makes a year fit on a 25×80 terminal. If arguments are not specified, the current month is displayed.

How to use cal command in Linux?

Show a calendar in the terminal

To show a calendar in the terminal simply run the cal command. The command will display a calendar of the current month with the current day highlighted.

cal

Show more than one month

To display more than one month pass the -n option along with the number of months that you wish to show. For example if you wish to see 2 months calendar from the current date/month, use the numeric 2.

cal -n 2

Show week numbers

To display week numbers use the -w command option.

cal -w

Show the day of the year in numbers

To show the day of the year in numbers use the -j command option. Note that this command option will display days numbered from January 1.

cal -j

Show a calendar for a particular day, month and year

To print a calendar for a particular month and year pass the day month and year to the cal command. The format is cal date month year. For example, if you wish to display the calendar of 01 January 2021, run the following command:

cal 01 01 2021

To display complete year calendar.

cal -y

NOTE

A year starts on Jan 1. The first day of the week is determined by the locale.

A single parameter specifies the year (1 – 9999) to be displayed; note the year must be fully specified: ”cal 89” will not display a calendar for 1989. Two parameters denote the month (1 – 12) and year.

Three parameters denote the day (1-31), month and year, and the day will be highlighted if the calendar is displayed on a terminal.

If no parameters are specified, the current month’s calendar is displayed.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap