Linux provides a lot of ways to display date and time information and not just for the current date and time. You can get information on dates way in the past or in the far future. You can also limit the data provided to just the current weekday or month. This post explains many of these options and provides examples of what you can expect to see.\nDisplaying the current date\nTyping \u201cdate\u201d on the Linux command line results in quite a bit more data than just the date. It also includes the day of the week, the current time and the time zone.\n$ date\nMon Oct 16 11:24:44 AM EDT 2023\n\nThe command shown below gives displays the date in the shorthand month\/day\/year format.\n$ date +%D\n10\/16\/23\n\nSeeing date information for any date\nIn fact, the date -d command will provide information on any date you specify. If you need to know the day of the week that Nov 11th will fall on in some particular year, enter a command like this one:\n$ date -d 11\/11\/23\nSat Nov 11 12:00:00 AM EST 2023\n\nAha, it\u2019s a Saturday -- maybe a good day for you to visit some friends!\nIf you want to see the day-of-week information for a bunch of birthdays with only a single command, you can take a list of important birthdays stored in a file like this:\n$ cat birthdays\nJan 4, 1972\nMar 18, 1949\nMay 1, 1976\nApr 1, 2017\nJan 8, 1954\nSep 23, 1979\nAug 6, 1956\nMay 2, 2014\n\nThen run the date command using the -f option like this:\n$ date -f birthdays\nTue Jan 4 12:00:00 AM EST 1972\nFri Mar 18 12:00:00 AM EST 1949\nSat May 1 12:00:00 AM EDT 1976\nSat Apr 1 12:00:00 AM EDT 2017\nFri Jan 8 12:00:00 AM EST 1954\nSun Sep 23 12:00:00 AM EDT 1979\nMon Aug 6 12:00:00 AM EDT 1956\nFri May 2 12:00:00 AM EDT 2014\n\nTo see the current date and time in the RFC-2822 format, use a command like this one:\n$ date --rfc-2822\nMon, 16 Oct 2023 12:06:00 -0400\n\nYou can also use this shortened method:\n$ date -R\nMon, 16 Oct 2023 12:06:02 -0400\n\nSeeing dates associated with files\nYou can even use the date command to display the last update time for a file using the date -r command:\n$ date -r notes\nTue Sep 19 01:17:37 PM EDT 2023\n\nUsing time zones\nTo get the current date and time for a particular time zone, use a command like this one:\n$ TZ=America\/New_York date\nMon Oct 16 12:17:51 PM EDT 2023\n\nBe careful to spell the time zone correctly or you might get a response that makes you scratch your head and wonder what the answer really means:\n$ TZ="America\/Spaghetti" date\nMon Oct 16 05:43:43 PM America 2023\n\nHmm, Spaghetti must be a very interesting time zone! Let\u2019s check on an old favorite of mine.\n$ TZ="America\/Twilight_Zone" date\nMon Oct 16 05:43:46 PM America 2023\n\nOK, why not?\nViewing time\/date details\nUndoubtedly the most detailed time\/date command available on Linux is the timedatectl command that provides the time in both local and UTC formats along with some additional information on your system settings.\n$ timedatectl\n Local time: Mon 2023-10-16 11:01:40 EDT\n Universal time: Mon 2023-10-16 15:01:40 UTC RTC time: Mon 2023-16 15:01:40 Time zone: America\/New_York (EDT, -0400)\nSystem clock synchronized: yes\n NTP service: active\n RTC in local TZ: no\n\nNTP in the next-to-last line in the output refers to the \u201cnetwork time protocol\u201d -- the internet protocol used to synchronize computer clock time sources in a network and part of TCP\/IP.\nViewing time zones\nLinux recognizes nearly 600 time zones that the date command can use. To list them all, try the command timedatectl list-timezones. Here\u2019s a shortened example of what you will see:\n$ timedatectl list-timezones | grep America | column | head -5\nAmerica\/Adak America\/Jamaica\nAmerica\/Anchorage America\/Jujuy\nAmerica\/Anguilla America\/Juneau\nAmerica\/Antigua America\/Kentucky\/Louisville\nAmerica\/Araguaina America\/Kentucky\/Monticello\n\nWARNING: You won\u2019t very likely find \u201cSpaghetti\u201d or the \u201cTwilight Zone\u201d.\n$ timedatectl list-timezones | grep Spaghetti\n$\n\nYou can also ask the date command to supply a single piece of information on dates. For example, you can ask for the day of the week to be spelled out fully like this:\n$ date +%A\nMonday\n\nAdditional single value options include:\nOption Provides Example\n%B The full month name\t Monday\n%F The date in YYYY-MM-DD format 2023-10-16\n%H The hour in 24-hour format 21\n%I The hour in 12-hour format 9\n%j The day of the year 289\n%S Seconds 34\n%V The week of the year 35\n%x The date representation based on the locale 10\/16\/2023\n%X The time representation based on the locale 09:09:11 PM\n%Y Year 2023\n\nWrap-up\nThe date command can display the date and time in probably any way you might want \u2013 and then some!