nerdexam
Linux_Foundation

LFCS · Question #234

Which of the following commands will set the local machine's timezone to UTC?

The correct answer is B. ln -s /usr/share/zoneinfo/UTC /etc/localtime. Setting the system-wide timezone involves configuring the /etc/localtime file, typically by creating a symbolic link to a timezone definition file.

Submitted by ricky.ec· Apr 18, 2026Operation of Running Systems

Question

Which of the following commands will set the local machine's timezone to UTC?

Options

  • Acat UTC > /etc/timezone
  • Bln -s /usr/share/zoneinfo/UTC /etc/localtime
  • Cdate --timezone=UTC
  • Dmv /usr/timezone/UTC /etc

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    92% (22)
  • D
    4% (1)

Why each option

Setting the system-wide timezone involves configuring the `/etc/localtime` file, typically by creating a symbolic link to a timezone definition file.

Acat UTC > /etc/timezone

Simply echoing 'UTC' into `/etc/timezone` might be part of a simpler method on some systems, but it doesn't configure the actual timezone data used by the system comprehensively.

Bln -s /usr/share/zoneinfo/UTC /etc/localtimeCorrect

To set the system-wide timezone, a symbolic link is created from the specific timezone data file (e.g., `/usr/share/zoneinfo/UTC`) to `/etc/localtime`. This `localtime` file is then read by applications and services to determine the current local time.

Cdate --timezone=UTC

`date --timezone=UTC` will display the current date and time in UTC, but it does not permanently set the system's timezone.

Dmv /usr/timezone/UTC /etc

Moving files from `/usr/share/zoneinfo/UTC` to `/etc` is incorrect and would likely break the timezone configuration, as `/etc/localtime` expects a specific file or symlink from `/usr/share/zoneinfo`.

Concept tested: Setting system timezone to UTC

Source: https://man7.org/linux/man-pages/man5/localtime.5.html

Topics

#Timezone Management#System Configuration#Symbolic Links

Community Discussion

No community discussion yet for this question.

Full LFCS Practice