← All commands
Topic hub System & Storage
Windows Linux System & Storage Expanded guide System Info

Windows date /t & time /t equivalent in Linux

Shows the current date and time, or sets the system clock.

Windows date /t & time /t
→
Linux equivalents
Debian/Ubuntu same command
date
Fedora same command
date
Arch same command
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.

Migration tip: <code>date</code> supports powerful format strings. <code>date +%Y-%m-%d</code> prints the date in a format safe for filenames — no spaces or slashes.

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.

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 optionUse
dateShow 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 -uShow time in UTC
timedatectlFull 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related System & Storage commands