Steps to Change Time Zone on RHEL 9
Follow these steps to change the time zone from the command line on RHEL 9:
Step 1: Open Terminal
Begin by opening a terminal window on your RHEL 9 system. You can do this by clicking on the terminal icon in the desktop environment or by using the keyboard shortcut Ctrl + Alt + T.
Step 2: View Current Time Zone
Before changing the time zone, it’s a good practice to verify the current time zone settings. Use the following command to display the current time zone:
timedatectl
This command will output detailed information about the system’s date, time, and time zone configuration, including the current time zone identifier (e.g., ‘Asia/Kolkata’).
Step 3: List Available Time Zones
To view a list of available time zones that can be set on your system, use the following command:
timedatectl list-timezones
This command will display a long list of time zone identifiers in alphabetical order. You can scroll through the list to find the desired time zone.
Step 4: Change Time Zone
Once you’ve identified the desired time zone from the list, use the following command to set the new time zone:
sudo timedatectl set-timezone your_time_zone
Replace ‘your_time_zone’ with the identifier of the desired time zone (e.g., ‘America/Los_Angeles’). You will need to prefix the command with ‘sudo’ to run it with administrative privileges.
Step 5: Verify Time Zone Change
To confirm that the time zone has been successfully changed, re-run the ‘timedatectl’ command:
timedatectl
Check the output to ensure that the ‘Time zone’ field reflects the newly set time zone.
How to change time zone from command line on RHEL 9
Correctly setting the time zone on a Red Hat Enterprise Linux (RHEL) 9 system is crucial for ensuring accurate time synchronization and proper functioning of various applications and services. While graphical tools are available for configuring the time zone, administrators often prefer command-line methods for efficiency and automation. In this guide, we will explore how to change the time zone from the command line on RHEL 9, providing step-by-step instructions along with examples and explanations.
Contact Us