A system administrator manages a server in a data center that operates on UTC. The administrator is based in Los Angeles and needs all system logs and application timestamps to reflect the America/Los_Angeles timezone for easier correlation with local business hours. After logging in, the administrator runs the date command and sees Tue Oct 14 12:30:03 UTC 2025. Which command should the administrator use to correctly configure the system's timezone on a modern systemd-based server?
The correct answer is timedatectl set-timezone America/Los_Angeles. On modern Linux distributions that use systemd, timedatectl is the standard utility for managing system time, date, and timezone settings. Using set-timezone with the appropriate timezone name correctly reconfigures the system. The command ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime is the traditional manual method and, while it works, timedatectl is the recommended modern tool as it handles this and other related settings. dpkg-reconfigure tzdata is a command used on Debian-based systems that provides an interactive menu for timezone selection; timedatectl is a more direct, non-interactive, and universally applicable command on systemd systems. The hwclock command is used to interact with the hardware clock (RTC), not to set the system's timezone.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the timedatectl utility in Linux?
Open an interactive chat with Bash
How can I list all available time zones in Linux?
Open an interactive chat with Bash
What happens if I use an incorrect or deprecated command like tzconfig?