Rocky Linux 10 Tutorial / First updates, hostname and time synchronization

After installing Rocky Linux 10, review package updates, choose a hostname that identifies the server and verify time synchronization. The goal of this exercise is not just to check the update completion message, but also to confirm after reboot whether the running kernel, chronyd synchronization status, and settings are maintained.

Record the initial state and retain console access

This tutorial is carried out on a dedicated Rocky Linux 10.2 VM that has completed minimal installation and first login . A standard administrator account with sudo privileges, internet connection, and VirtualBox console should be ready. The commands below are executed inside the Rocky Linux VM, not in Windows PowerShell.

If it is a server in operation, set the backup and maintenance time first. Package updates can affect libraries, services, and the kernel, and VM snapshots do not replace separate backups of important data. On practice VMs, proceed in an order that verifies the initial configuration before placing important data.

mkdir -p ~/initial-state
hostnamectl hostname > ~/initial-state/hostname.before
timedatectl show -p Timezone --value > ~/initial-state/timezone.before
cat /etc/os-release
uname -r
ip -br address
ip route
df -h / /boot
rpm -q dnf systemd chrony

hostname.before and timezone.before store the initial name and time zone. If ~/initial-state already contains records from an earlier exercise, preserve them and choose a separate directory throughout this procedure rather than overwriting your original baseline. The OS version and kernel are different values. For example, even if the distribution version is Rocky Linux 10.2, the kernel package can change depending on security and bug fixes. Also, check /boot and the free space in the root area.

Separate the update list and change plan.

DNF is a tool that checks the package list and dependencies from repositories to install and update. First, query the currently activated repositories and update list. At this stage, there is no need to add third-party repositories or disable verification functions.

dnf repolist
sudo dnf --refresh check-update
echo $?

--refresh ensures that repository metadata is rechecked. echo $? displays the exit code of the previous command, so do not insert other commands in between. The DNF command reference explains the following check-update results.

Exit code Meaning and next step
0 The query was successful, and there are no items to update in the currently checked repository.
100 There are packages to update. Do not misunderstand this as a command failure; review the list and change plan.
1 An error occurred. Check the actual message for repository access, DNS, authentication, metadata errors, etc.

In this exercise, after reading metadata such as the official BaseOS and AppStream, the update list and exit code 100 were displayed. The package list and count will vary depending on the query time and installation configuration. Do not confuse sudo’s code for authentication failure with the code after DNF was actually executed.

Now, check the installation plan with the next command. Initially, skip -y to read which packages are being added, upgraded, or removed, and whether the download size and repository match expectations.

sudo dnf upgrade --refresh

Proceed with y and Enter only when the plan in Is this ok [y/N]: matches. If you are unsure, cancel with Enter or n and check the cause. The initial plan for this exercise was to install 6 new packages, update 115 packages, and download about 356M, including the kernel. This is an observation for learning purposes and is not an answer that must match every time.

Check the signing key and wait until the update is complete.

During the first update, a prompt may appear asking whether to import the official signing key. Do not approve based on the short key ID alone; compare the full fingerprint of the Rocky Linux official GPG key information, the distribution version, and the repository key file. The official release key fingerprint for Rocky Linux 10 is as follows.

FC22 6859 C086 0BF0 DDB9 5B08 5B10 6C73 6FED FC85

The source lab VM imported its key from /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10. If a key from an unknown repository or a different fingerprint appears, check the cause. Do not add --nogpgcheck or disable repository signature checks to eliminate errors.

Keep the VM powered on and network connected until the download and transaction complete and Complete! is displayed. Do not forcibly shut down during installation or run overlapping DNF operations in other terminals. If it fails, check the last error and sudo dnf history info last before taking action. Do not delete the RPM database without reading the logs.

Rocky Linux Software Management Guide shows the role of package management and the update commands. What is performed here is the initial update for the installed version 10 series. It is not treated the same as switching to another major version.

Change the hostname and check the actual applied value

The hostname is the name used to identify the server in logs and the management interface. In the exercise, use a short combination of lowercase English letters, numbers, and hyphens, as in rocky10-lab, that helps understand its role. Confirm that it is the correct VM for running the command before making changes.

sudo hostnamectl hostname rocky10-lab
hostnamectl hostname
hostnamectl --static
cat /etc/hostname

Check whether the expected name is confirmed in three lookups. The official description of hostnamectl in systemd 257 distinguishes between the explicitly set static name and the transient name received from the network. This exercise configures the static name.

Even if the old name remains in the current shell prompt, do not immediately consider it a failure. Check hostnamectl and the configuration files before the displayed string, and verify it again in a new login session. This command by itself does not register the name with a DNS server or change the IP address or TLS certificates. To connect from another computer using this name, separate name resolution configuration is required.

If you chose the wrong name, you can read the previously saved value to revert it. In systems that initially had no static names, this method explicitly saves the displayed name at that time, so on production servers where existing settings need to be preserved, it is necessary to keep even the existence of the original file.

previous_hostname=$(cat ~/initial-state/hostname.before)
sudo hostnamectl hostname "$previous_hostname"

Check the time zone and chrony synchronization separately.

The time zone determines which region's time a specific moment is displayed as, while time synchronization adjusts the system clock so that it does not deviate from the actual time. Simply changing to Seoul time does not mean it is synchronized with an Internet time server.

timedatectl list-timezones | grep '^Asia/Seoul$'
sudo timedatectl set-timezone Asia/Seoul
timedatectl

Check Time zone: Asia/Seoul (KST, +0900). It is normal for UTC and KST to show a 9-hour difference. timedatectl's official explanation distinguishes between the time zone, system clock, and hardware clock settings. This exercise does not change the hardware clock to local time nor manually move the system time forward or backward.

Chrony on Rocky Linux communicates with time servers using NTP (Network Time Protocol). chronyd is the running service, and chronyc is the command to check the status. If the package is missing, install it and set the service to start at boot.

sudo dnf install chrony
sudo systemctl enable --now chronyd
systemctl is-enabled chronyd
systemctl is-active chronyd
chronyc tracking
chronyc sources -v
Query results How to read
enabled and active These are the startup settings and current running status at each boot. This alone does not guarantee successful synchronization.
System clock synchronized: yes Check in timedatectl whether the system clock is reported as synchronized.
Leap status: Normal Read the clock status of tracking. If it is Not synchronised, investigate the time source and communication status.
^* time source Refers to the currently selected server. ^+ is the source used together, and ^? is the source currently unavailable.

Immediately after the first startup, it may take time to select a source and collect samples. Instead of repeatedly restarting the service, check again after a short while. Refer to Rocky Linux chrony setup guide and chrony 4.8 query command explanation to read the actual selected source and status.

If synchronization continues to fail, check for errors in sudo journalctl -u chronyd -b --no-pager and inspect the server/pool names, DNS, and NTP communication path in /etc/chrony.conf. If you need to use an internal time server, prioritize that policy. There is no need to disable the VM firewall or open time services to the internet just for simple NTP client practice. Do not overwrite the default settings that are already synchronizing without reason.

When only reverting the time zone, use the stored value. Changing the time zone and changing the time server settings are separate tasks.

previous_timezone=$(cat ~/initial-state/timezone.before)
sudo timedatectl set-timezone "$previous_timezone"

After rebooting, cross-check the kernel and settings again.

Even if the updated files have been installed on the disk, the currently running kernel may remain unchanged. uname -r shows the current kernel, and rpm -q kernel-core shows the installed kernel package. In this practice, where the kernel has been updated, reboot while having access to the console.

uname -r
rpm -q kernel-core
sudo reboot

Rebooting will disconnect the current session. Wait a moment, log in again with a regular account, and check the following. If you return to the installation ISO menu, do not reinstall; instead, first check the boot order of the installed disk.

uname -r
hostnamectl --static
timedatectl
systemctl is-active chronyd
chronyc tracking
chronyc sources -v
sudo dnf history info last
sudo dnf check-update
echo $?

The source lesson’s November 12, 2026 test performed these tasks inside a Rocky Linux 10.2 guest on Windows VirtualBox 7.2.10. The running kernel, which was 6.12.0-211.16.1.el10_2.0.1.x86_64 before the reboot, changed to 6.12.0-211.74.1.el10_2.x86_64 after the reboot. rocky10-lab and Asia/Seoul were maintained, and the update history showed Return-Code: Success, with exit code 0 when re-checking updates. chronyd was running, and clock synchronization was yes, with the tracking status confirmed as Normal. The kernel package release and selected time server depend on when the system was installed and queried.

We check whether the system boots with the new kernel while keeping the hostname and time zone, and whether the time source is re-selected. Update query results are interpreted based on the active repositories at that time. Since new updates may appear as time passes, we do not consider 0 as a permanent state. If there are issues with services or booting into the new kernel, check the bootability of previously installed kernels and the change history, and avoid blind removal of packages.