LPIC-1 Exam 102 v5 (Linux Administrator) — Question 69
Which of the following commands sets the system's time zone to the Canadian Eastern Time?
Answer options
- A. localegen -t -f /usr/share/zoneinfo/Canada/Eastern > /etc/locate.tz
- B. tzconf /etc/localtime
- C. sysctl -w clock.tz='Canada/Eastern'
- D. modprobe tz_ca_est
- E. ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime
Correct answer: E
Explanation
The correct command is E, which creates a symbolic link to the Eastern Time zone file, effectively setting the system's time zone. Option A is incorrect because it attempts to generate a locale file instead of setting the time zone. Options B and C do not provide a method for changing the time zone, and option D is related to loading a kernel module, which is unrelated to time zone configuration.