Requirements
- CentOS 7
- user account with root privileges
- Terminal window or putty
Check Existing Hostname
hostnamectl
You can see the current hostname next to static hostname,
Set a New Static Hostname
CentOS 7 only allows Fully Qualified Domain Names (FQDNs) that mean
it allow
- Lower-case letters
- Numbers
- Periods and hyphens
- 2 and 63 characters
- hostname must start and end with a number or letter
hostnamectl set-hostname server.promohosts.com
Replace server.promohosts.com with your hostname
After editing the hostname check again by using
hostnamectl