Display Date And Time In Linux

by on January 7, 2009 · 4 comments· LAST UPDATED November 7, 2009

in , ,

How do I display date and time in Linux using command line and GUI options?

To display date and time under Linux operating system using command prompt use the date command. It can also display the current time / datein the given FORMAT, or set the system date and time as root user.


Open a terminal and type the following command:


Sample outputs:

Sat Nov  7 22:44:59 IST 2009

You can format the date as follows in dd-mm-yy format:

date +"%d-%m-%y"

Sample outputs:


To print the date of the day before yesterday:

date --date='2 days ago'

To print the day of year of Christmas in the current year:

date --date='25 Dec' +%j

To print the current full month name and the day of the month:

date '+%B %d'

GUI Tool: Time Administration

The Time Administration Tool allows you to set the time, date and timezone of your system, as well as setting any time server to synchronize your local time server. Type the following command to start time admin tool:

sudo time-admi


Fig.01: Linux Date and Time  Administration Tool

Fig.01: Linux Date and Time Administration Tool

You may be prompted for the administrator password (root password), this is necessary because the changes done with this tool will affect the whole system.

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 4 comments… read them below or add one }

1 ramkumar April 5, 2013 at 8:53 am

sir i want to set date format to dd/mm/yyyy but not able to do it
that when i execute date command i get output in dd/mm/yyyy format if any help
please reply

ramkumar sharma


2 Sharil Ali PV July 1, 2013 at 9:51 am

Please try this

date +%d/%m/%Y


3 janine May 9, 2014 at 10:02 am

hi sir i want to ask favor . can u answer this my project.
converting php to mysql
and inserting date and time in/out
thank u sir..
hope u get it


4 John June 28, 2014 at 6:23 pm

Is there any way this can be done in the motd and show the current time of the login?


Leave a Comment

Tagged as: , , , , , , , , , , , , ,

Previous Faq:

Next Faq: