System & ProcessesCLI Reference
$date
Display or set system date and time.
Syntax DefinitionPOSIX standard
date [OPTIONS] [+FORMAT]Try `date` Live in Interactive Sandbox
Zero-install client simulation with real-time feedback.
bash — terminal
AST Sandbox (Free)
Overview & How date Works
`date` prints or sets the system date, time, and timezone. In shell scripts, it is commonly formatted (e.g., `date +%Y-%m-%d`) to generate timestamped backup filenames and logs.
Common Flags & Command Options
| Flag / Option | Description |
|---|---|
| +%Y-%m-%d | Format output as Year-Month-Day (e.g., 2026-08-29). |
| -u, --utc | Print date and time in Coordinated Universal Time (UTC). |
Practical Real-World Examples
Frequently Asked Questions
How do you format a timestamp for backup filenames?
Run `date +%Y%m%d_%H%M%S` which produces a clean format like `20260829_120000`.
Related Linux Commands
$psSystem & Processes
Report a snapshot of currently running system processes.
$topSystem & Processes
Display real-time Linux processes and system resource utilization.
$htopSystem & Processes
Interactive process viewer with colorful CPU meters and mouse support.
$killSystem & Processes
Send termination or control signals to processes by PID.
$whoamiSystem & Processes
Print the effective username associated with the current shell session.
$unameSystem & Processes
Print operating system name and kernel architecture.