Windows date /t & time /t equivalent in Linux
Shows the current date and time, or sets the system clock.
date /t & time /t
date
date
date
Overview
What this command does
On Windows, "date /t & time /t" is used to display or set date and time. On Linux, the closest practical mapping shown here is "date". Shows the current date and time, or sets the system clock. This reference is grouped under System & Storage → System Info.
Windows → Linux context
What changes when you use this on Linux?
Same name, different environment
The basic command name date is familiar on both platforms, but Linux path rules, quoting, permissions and available options can still change the result.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux disks, storage and mounts.
Practical tasks
Common use cases
Display or set date and time
Shows the current date and time, or sets the system clock.
date
Show current date and time
date +"%Y-%m-%d"
Date in YYYY-MM-DD format
date +"%H:%M:%S"
Time in HH:MM:SS format
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
date
date +"%Y-%m-%d"
date +"%Y%m%d_%H%M%S"
timedatectl
tar -czf backup_$(date +%Y%m%d).tar.gz ~/Documents
Walkthrough
Examples with explanations
# Windows: date /t and time /t
date # Sat Jan 15 14:32:00 EST 2025
date +"%Y-%m-%d" # 2025-01-15
date +"%Y%m%d_%H%M%S" # 20250115_143200 (for filenames!)
timedatectl # timezone, NTP sync status
# Use in filenames:
tar -czf backup_$(date +%Y%m%d).tar.gz ~/Documents
Reference
Common options and variations
| Command or option | Use |
|---|---|
date | Show current date and time |
date +"%Y-%m-%d" | Date in YYYY-MM-DD format |
date +"%H:%M:%S" | Time in HH:MM:SS format |
date -u | Show time in UTC |
timedatectl | Full time/timezone/NTP status |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "date" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | date |
Same command on this distribution. |
| Fedora | same command | date |
Same command on this distribution. |
| Arch | same command | date |
Same command on this distribution. |
Keep learning