How do i print the current calendar on linux?



  • Man page for cal.

    Print the current month calendar.

    $ cal
        January 2019    
    Mo Tu We Th Fr Sa Su
        1  2  3  4  5  6
     7  8  9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31
    

    Print the previous month, present month, and next month.

    $ cal -3
        December 2018         January 2019          February 2019   
    Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su  Mo Tu We Th Fr Sa Su
                    1  2      1  2  3  4  5  6               1  2  3
     3  4  5  6  7  8  9   7  8  9 10 11 12 13   4  5  6  7  8  9 10
    10 11 12 13 14 15 16  14 15 16 17 18 19 20  11 12 13 14 15 16 17
    17 18 19 20 21 22 23  21 22 23 24 25 26 27  18 19 20 21 22 23 24
    24 25 26 27 28 29 30  28 29 30 31           25 26 27 28         
    31                                                              
    

    Display entire year.

    $ cal 2019
    

    Display Monday as the first day of the week.

    $ cal -m
    

    Display Sunday as the first day of the week.

    $ cal -s 
    


© Lightnetics 2024