While most Linux users are familiar with the standard cal command for displaying a quick calendar in the terminal, it outputs the days of the month in a traditional horizontal grid. If you prefer a more compact, vertical layout—where the days of the week run down the left side and the dates populate the columns—the ncal (New Calendar) command provides exactly what you need.
What is the ncal Command?
The ncal utility is an alternative calendar generator pre-installed on most modern Linux distributions, including Ubuntu and Debian. Beyond its unique vertical layout, it also offers advanced features such as the ability to display the current week number and easily switch the starting day of the week, making it highly useful for project management and shell scripting.
Step 1: Display the Current Month
Using ncal is just as simple as using the traditional calendar command.
- Open your terminal emulator application.
- Type the following command and press Enter:
ncal
The output will display the current month. However, unlike standard calendars, the days (Mo, Tu, We, Th, Fr, Sa, Su) will be listed vertically on the left-hand axis, with the corresponding dates reading across the screen from left to right. The current date will be highlighted.
Step 2: Display Specific Months and Years
You can easily view past or future calendars by appending arguments to the command.
- To view the entire calendar for a specific year (e.g., 2024), use:
ncal 2024
- To view a specific month of a specific year, type the month number followed by the year. For example, to view August 2025:
ncal 8 2025
Step 3: Enable Week Numbers
One of the most useful features of ncal is its ability to display the ISO week numbers, which is essential in many corporate and academic environments.
- To print the current month alongside the week numbers, use the
-wflag:
ncal -w
The week number will be displayed at the bottom of each vertical column.
Step 4: Change the Starting Day of the Week
Depending on your region, you may prefer your calendar to start on a Sunday rather than a Monday.
- To force the calendar to start on Sunday (often considered the American format), use the
-Sflag:
ncal -S
- Conversely, to explicitly force a Monday start (the standard European format), use the
-Mflag:
ncal -M
By integrating ncal into your workflow, you can quickly reference dates, week numbers, and vertical schedules without ever leaving the Linux command line.