date command is used to display the system date and time. date command is also used to set date and time of the system. By default the date command displays the date in the time zone on which unix/linux operating system is configured. You must be the super-user (root) to change the date and time.
What is the date format in Unix?
Below is a list of common date format options with examples output. It works with the Linux date command line and the mac/Unix date command line.
…
Bash date format options.
| Date Format Option | Meaning | Example Output |
|---|---|---|
| date +%m-%d-%Y | MM-DD-YYYY date format | 05-09-2020 |
| date +%D | MM/DD/YY date format | 05/09/20 |
What is the command to find date and time in Linux?
To display date and time under Linux operating system using command prompt use the date command. It can also display the current time / date in the given FORMAT. We can set the system date and time as root user too.