Progress: 0/62 (0%)
π Checking Date, Time, and Calendar
Checking Date, Time, and Calendar
Linux gives you commands to quickly check the current time, date, or see a calendarβlike having a clock and a calendar on your desk.
Linux gives you commands to quickly check the current time, date, or see a calendarβlike having a clock and a calendar on your desk.
date β Current Date and Time
What it is: Shows the current system date and time.
Analogy: Like glancing at a wall clock to see the exact time.
date
π Example:
Fri Oct 25 12:34:56 UTC 2025
Formatting options: You can customize the output:
date +"%Y-%m-%d %H:%M:%S"
π Example:
2025-10-25 12:34:56
cal β Calendar
What it is: Displays a calendar for a month or year.
Analogy: Like pulling out a paper calendar to check dates.
cal
Shows the current month
cal 12 2025
See a specific month/year: Shows December 2025
Real-life analogy
π‘ Tip: Combine with date to know both the current time and where you are in the calendar. Handy for scheduling tasks or cron jobs.