-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux date Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to date on Linux, covering Arch Linux, CachyOS, and other distributions including date display, date formatting, and date manipulation.
Basic usage:
# Show current date
date
# Displays current date and timeCustom format:
# Custom format
date +"%Y-%m-%d"
# Output: 2024-01-15ISO 8601:
# ISO format
date -I
# Output: 2024-01-15RFC 2822:
# RFC format
date -R
# Output: Mon, 15 Jan 2024 10:30:00 +0000Custom format:
# Format string
date +"%Y-%m-%d %H:%M:%S"
# Output: 2024-01-15 10:30:00Useful formats:
# Year-Month-Day
date +"%Y-%m-%d"
# Day/Month/Year
date +"%d/%m/%Y"
# Full date
date +"%A, %B %d, %Y"Change date:
# Set date (requires root)
sudo date -s "2024-01-15 10:30:00"
# -s = set (sets system date)Add/subtract:
# Tomorrow
date -d "tomorrow"
# Next week
date -d "next week"
# 5 days ago
date -d "5 days ago"Check installation:
# date is part of coreutils
# Usually pre-installed
# Check date
which dateThis guide covered date usage, date formatting, and date manipulation for Arch Linux, CachyOS, and other distributions.
- cal Guide - Calendar display
- timedatectl Guide - Time management
- Time Synchronization - Time sync
-
date Documentation:
man date
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.