102-500 practice question 2 of 30
Which command will set the local machine's timezone to UTC?
Full set: 233 questionsThe standard, persistent method for setting the system-wide timezone on most Linux systems is to manage the /etc/localtime file. This file is typically a symbolic link to a specific timezone data file located in the /usr/share/zoneinfo/ directory. The command ln -s /usr/share/zoneinfo/UTC /etc/localtime creates this link, pointing to the file for Coordinated Universal Time (UTC). System services and applications read /etc/localtime to determine the correct local time.
A: This command modifies /etc/timezone, a helper file on some systems (like Debian), but it is not the primary or universal mechanism for setting the system time. C: The date command only displays the time in a specified timezone for that single command's execution; it does not change the system's persistent configuration. D: The standard path is /usr/share/zoneinfo, not /usr/timezone. Furthermore, a symbolic link is the correct method, not moving the file.
man 5 localtime: "The /etc/localtime file configures the system-wide timezone... It is normally a symbolic link to a file in the timezone database under /usr/share/zoneinfo."
Red Hat Enterprise Linux 9 Documentation, "Configuring basic system settings", Section 3.6. "Configuring the time zone". This section explains that tools like timedatectl manage the /etc/localtime symbolic link.
Arch Linux Wiki, "System time", Section "Time zone". The documentation explicitly states the standard procedure: # ln -sf /usr/share/zoneinfo/Region/City /etc/localtime.
Keep practicing
Take the free 102-500 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 102-500 practice questions
- Question 1What output is produced by the following command sequence? echo ‘1 2 3 4 5 6’ | while rea…
- Question 3Which of the following SQL statements will select the fields name and address from the co…
- Question 4Which of the following commands can remove a user from a group?
- Question 5Where are user specific crontabs stored?
- Question 6Which of the following crontab entries will execute myscript at 30 minutes past every hou…
- Question 8Which file, when using Sendmail or a similar MTA system, will allow a user to redirect al…
