Date and Time Commands in Linux (original) (raw)

Last Updated : 7 Jan, 2026

Date and time commands in Linux are used to display the current date, system time, calendar information, and system uptime. These commands help users track system activity, schedule tasks accurately, and monitor how long the system has been running.

Date and time commands are mainly used to:

Below are the commonly used Date and Time Commands in Linux

date_and_time_commands

1. cal

The cal command is used to display a calendar in the terminal.

**Syntax:

cal [month] [year]

**Example:

cal

2. date

The date command displays or sets the system date and time.

**Syntax:

date

**Example:

date

Display Current Date and Time in Linux

3. uptime

The uptime command shows how long the system has been running.

**Syntax:

uptime

**Example:

uptime

file

Why Date and Time Commands Are Important?

Use Cases:

Given below are some use cases that help us understand why we use these commands.

Checking System Time Before Running Scheduled Jobs

Monitoring System Availability and Stability

Viewing Calendars and System Runtime

Comparison: date vs uptime

The date command displays the current system date and time, while the uptime command shows how long the system has been running along with its load information.

date Command

uptime Command