LFCS · Question #112
What is true about the file /etc/localtime?
The correct answer is D. It is either a symlink to or a copy of a timezone information file such as. The /etc/localtime file is either a symbolic link to or a copy of a timezone data file, informing the system of its local timezone.
Question
Options
- AIt is a plain text file containing a string such as Europe/Berlin.
- BIt is created and maintained by the NTP service based on the geolocation of the system's IP
- CIt is a symlink to /sys/device/clock/ltime and always contains the current local time.
- DIt is either a symlink to or a copy of a timezone information file such as
How the community answered
(28 responses)- B4% (1)
- C4% (1)
- D93% (26)
Why each option
The `/etc/localtime` file is either a symbolic link to or a copy of a timezone data file, informing the system of its local timezone.
`/etc/localtime` is not a plain text file with a simple string; it contains binary timezone data or is a symlink to such a file.
The NTP service synchronizes the system clock but does not create or maintain the `/etc/localtime` file, which is managed by timezone configuration utilities.
`/etc/localtime` is not typically a symlink to `/sys/device/clock/ltime` and specifies timezone rules, not the current local time itself.
The `/etc/localtime` file is essential for configuring the system's local timezone. It is typically a symbolic link pointing to a specific timezone information file located within the `/usr/share/zoneinfo` directory (e.g., `/usr/share/zoneinfo/Europe/Berlin`), or in some cases, a direct copy of such a file, containing binary timezone data.
Concept tested: Linux timezone configuration (`/etc/localtime`)
Source: https://man7.org/linux/man-pages/man5/localtime.5.html
Topics
Community Discussion
No community discussion yet for this question.