Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

date

Display or set system date and time

Syntax

date [OPTION]... [+FORMAT]

Common Options

+%Y4-digit year
+%m2-digit month
+%d2-digit day
+%HHour (24-hour)
+%MMinute
+%SSecond
+%sUnix timestamp
-dSpecify date string
-uShow UTC time
+%AFull weekday name
+%FISO date format
+%TTime format

Common Examples

date

Show current date and time

date +%Y-%m-%d

Show date in YYYY-MM-DD

date +%s

Show Unix timestamp

date -u

Show UTC time

date -d "next Friday"

Show next Friday

date -d "2 days ago"

Show date 2 days ago

date +"%Y-%m-%d %H:%M:%S"

Custom format

date -d @1609459200

Convert timestamp to date

Related Commands

Related Tools

More Code & Dev Tools