Linux calendar from the terminal
Linux calendar function is a neat and useful little tool. Getting the calendar directly in the terminal, if you need to, while working in the terminal.
Cal is a built in tool in bash, coming with all Linux versions. And OS X, BSD and other compatible versions of Unix. If you open your terminal and type cal, it will print this months calendar. Like in the picture below.
To print the calendar for the full year, there is two ways of doing that. You can type cal -y to display the current year. If you are wondering how 2025 is looking, just type cal 2025 to find that out. By the way 24th of December is on a Wednesday in 2025.
You can choose to display just december in 2025 instead of the whole year. Just type cal 12 2025 to display the calendar for december 2025. As shown in the picture below.
There is also an alternative layout. The cal function can not display week number, and we weeks always starts on Sunday. That can not be changed with parameters or attributes for the function. Where I live, Norway, weeks starts on Monday and not sunday. You can use the alternative layout to have weeks starts on monday. First lets try the alternative layout by typing ncal. This will display the alternative layout. To have the Linux calendar starts on monday, just type ncal -M. Both are displayed in the picture below.
How about week numbers, can Linux calendar display week numbers? Yes, but only through the altnerative layout. The cal function can not display week numbers. Lets try and see if we can get some week numbers here. Try that by type ncal -w. If you live in a part of the world where the weeks starts on Monday, type ncal -M -w to have the week starts on monday and week numbers. Check out the picture below for an example print out.
If you are interested in getting a weather report from linux terminal, check this out: http://soltveit.org/command-line-weather-report-linux-os-x/
These examples on the screen prints was done in Debian. If you want to try out Debian, a rock solid linux distribution but not the latest apps, you can get it here: https://www.debian.org
Thats it about Linux Calendar.