Learn to display a monthly or yearly calendar at the Linux command line.
Linux cal command summary with examples (2:59)
Videos can also be accessed from the YouTube Playlist.
Our forty-second word, or command to memorize is
cal from our category
cal allows you to display a
Recall from the previous video, we used the
calendar command to display reminders
and send updates, now with
have an easy command offering a calendar view.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
cal command has
6 options and no arguments.
Unlike most commands, help isn't available with double-dash
--help, so I suggest using the
man cal command for
documentation. The default is the current month, and with
-3 view three months, and for the
whole year use the
You can also customize this and get more granular, but I figure you'll use your phone, email program or wall calendar for that.
So why is
cal an important command?
Well, if you're completely focused on the terminal and don't want to
turn your attention away from the screen,
cal offers a quick way to remember
what the heck day it is.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's do a
cal without options for the current
Next, we'll do a
cal with the minus or
-3 option to add the surrounding two
And last, let's throw in a
for the whole year.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
So again, I think
cal is best for a
quick look at a recent month, or few months, but check out the
-m option in the
man cal page to review other months,
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
If you learned something today, please consider subscribing. Every bit helps.
calendarcommand, hit Back.
sleepcommand, click Next.