System time
Linux maintains system time used by applications, logs, scheduled tasks and services.
Linux · Lesson
Linux · Lesson
components/linux/linuxLessons.js.Correct system date and time settings are extremely important in Linux environments. Logs, scheduled jobs, authentication and distributed applications all depend on accurate time settings.
Linux provides several utilities such as date, cal and timedatectl for managing system time and timezone configuration.
Linux maintains system time used by applications, logs, scheduled tasks and services.
Commands like cal help administrators quickly view monthly and yearly calendars.
Linux supports multiple global timezones and allows administrators to switch between them.
Practice the following commands in your Linux lab to understand how date, time and timezone management works.
The date command displays the current system date, time and timezone.
The cal command shows the calendar for the current month.
You can print the full calendar for any year using cal <year>.
Use cal with a month name to display that month’s calendar.
Use formatting options with date to print only the time.
The +%B format option prints the full month name.
The +%A format option prints the current weekday name.
The +%z option shows the current timezone offset from UTC.
Root users can manually update the system date and time.
timedatectl provides detailed information about system time and timezone settings.
Use timedatectl set-timezone to configure a different system timezone.
date and verify your current timezone.cal YEAR.date +%B.timedatectl list-timezones.timedatectl.In upcoming lessons, you will continue learning important Linux administration commands and system-management tools.