CompTIA Linux+ (XK0-004) — Question 178

A Linux administrator looks at the /etc/timezone file and determines the need to change the time zone from California to New York temporarily. Which of the following commands will accomplish this?

Answer options

Correct answer: C

Explanation

The correct command is 'export TZ=America/New_York', as it sets the environment variable TZ to the desired time zone, affecting the current session. The other options do not correctly set the time zone; 'sed', 'cat', and 'printf' do not have the functionality required for changing the time zone in this context.