Check Time in Linux
Revision as of 15:01, 20 September 2022 by Kipkis (Kipkis | contribs) (Text replacement - "[[Category:L" to "[[Category: L")
Use the GNU utility, date. Check 'date --help' or 'man date' for all of the options, which are too numerous to list here. With no parameters, this utility will display the day of the week, the month, date, time in hh:mm:ss, the timezone and the year. There are options to customize the default output in dozens of different ways.
Steps
- Execute the command date with no parameter's date
- For example
- > date
- Fri Oct 9 08:31:07 MST 2009
Tips
- Follow the instructions in https://www.wikihow.com/Change-the-Timezone-in-Linux to make sure your system is configured to the correct timezone.
- One way to synchronize your computer's clock to the international standard: 'ntpdate 2.north-america.pool.ntp.org' if you are in North America.
- http://support.ntp.org/bin/view/Servers/NTPPoolServers lists time servers that might be closer (it doesn't matter which one you use, the ntp servers will include the round-trip network latency in the response). You can download the Network Time Protocol software from that site if it is not included in your distribution.
- For a more comprehensive explanation of the 'date' command, which is included in the GNU Coreutils, visit http://www.gnu.org/software/coreutils/manual/coreutils.html#date-invocation
Related Articles
- Get Eve Premium Content Working on Linux
- Use File Permissions in Linux
- Unrar Files in Linux
- Format a Linux Hard Disk to Windows
- Check Linux Distribution