Linux calendar from the terminal

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.

linux calendar

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.

linux calendar

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.

linux calendar

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.

linux calendar

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.

linux calendar

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.

Happy date!

Related Posts

4 Best Free Nas Software That Is Open Source

Free NAS software or operating systems that are free to use and will turn a computer into a NAS more advanced than the dedicated boxes sold. What…

Raspbian default password

Raspbian default password

Looking for the Raspbian default password? It is the most essential username and password that you will need for your raspberry. At least if you are running…

OpenMediaVault default password

OpenMediaVault default password

OpenMediaVault default password is printed in the documentation. I did not see it the first time I installed it either. So I had to do some detective…

Debian change dns

Debian change DNS settings to a new DNS

Debian change DNS settings for speed improvement or privacy. It is really easy to do. So let us see how it’s done and get to it. The…

Upgrade debian 9 to debian 10

Upgrade Debian 9 to Debian 10

Upgrade Debian 9 to Debian 10 is very similar to upgrading previous versions. The only you need to do is change the sources to Buster instead of…

Debian 10 Static IP

Debian 10 Static IP

Debian 10 static IP works just like the previous version. They changed the naming of the network interfaces in Debian 9. However if you have upgraded from…

Leave a Reply