How do I change the hostname on AlmaLinux? Print

  • Almalinux, Hostname
  • 0

Dear Sir,

To change the hostname on your AlmaLinux server, log in to the server via SSH as root (or use sudo), then run the following command:

 
hostnamectl set-hostname yourhostname.yourdomain.com

Replace yourhostname.yourdomain.com with the hostname you want to use.

To confirm that the change was applied, run:

 
hostnamectl

The Static hostname line should show your new hostname.

Please note:

  • The hostname should be a fully qualified domain name (FQDN), and it is recommended that it has a matching DNS record pointing to your server's IP address.
  • Some services may need to be restarted, or the server rebooted, for the change to take full effect.

If you need any further assistance, don't hesitate to get in touch with us at support@ne.com.eg.

Best Regards,
Support Team
Network Egypt


Was this answer helpful?

« Back