AlmaLinux and Ubuntu servers
To change the time zone on a server running AlmaLinux or Ubuntu, follow these steps:- Log in to the server using SSH.
-
To view the current time zone, type the following command:
-
To view a list of available time zones, type the following command:
-
As the root user, type the following command to change the time zone. Replace timezone with the name of the time zone you obtained in step 3:
For example, to set the time zone to Paris, France, type
timedatectl set-timezone Europe/Paris.📘 Note Alternatively, as a non-root user you can type the following command if the account has sudo privileges:
-
To verify the new time zone change, type the following command:
Debian servers
To change the time zone on a server running Debian, follow these steps:- Log in to the server using SSH.
-
As the root user, type the following command:
📘 Note Alternatively, as a non-root user you can type the following command if the account has sudo privileges:
- Use the arrow keys to select the geographic area, and then press Enter.
- Use the arrow keys to select the city or region in the time zone that you want, and then press Enter.