QuestionQ116

VerifiedEssential Commands

Which of the following tasks can be performed with the date command?

Choose two
Explanation

The date command is used to display and set the system's software clock. Using format specifiers (e.g., date +%Y-%m-%d), it can output the current date and time in many different formats. It can also set the system clock directly, for example with date MMDDhhmm[[CC]YY][.ss] or date --set="STRING". Setting or reading the hardware clock, and synchronizing it with the system clock, is done with the hwclock utility, not date. Updating the time automatically via NTP is handled by services such as chronyd, ntpd, or systemd-timesyncd, not by the date command.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!