To change the hostname on CentOS Stream 9, follow these steps.
Step 1 : Check Current Hostname
Step 2 : Set the New Hostname (e.g., server-01)
Step 3 : Verify the New Hostname
Step 4 : Reboot the System
Congratulations! You have successfully set or changed the hostname on CentOS Stream 9. Your system should now reflect the updated hostname after the reboot.