Linux get time in milliseconds
- how to print time in linux
- how to print time in linux terminal
- how to display time in linux
- how to print epoch time in linux
Linux set-timezone.
How to set-time in linux
Get Current Date and Time on Linux
Knowing how to retrieve the current date and time on a Linux system is essential for system administration, scripting, and logging. The command on Linux allows users to display and format the current date and time.
This tutorial explains how to get current date and time on Linux.
1. Current date and time (Local)
To get the current system date and time in your local timezone, simply use:
Example output:
2. Current date and time (UTC)
If you need to retrieve the current date and time in Coordinated Universal Time (UTC), use the option:
Example output:
3.Linux time command
Current date and time in ISO 8601 format (Local)
The ISO 8601 format is commonly used in logs and automation. To display the current date and time in local time with this format, use:
Example output:
4. Current date and time in ISO 8601 format (UTC)
To retrieve the current date and time in UTC using ISO 8601 format, run:
Example output:
- how to print date and time in linux script
- how to display current time in linux shell