hostnamectl
Setup Hostname
-
We will set up a hostname to identify the server uniquely.
hostnamectl set-hostname mail.domain.com
-Then, verify the change by running this command:
```
hostname
```
-
The output should look like this:
mail.domain.com
-Next, update the hosts file:
```
vim /etc/hosts
```
-
Change an entry like this:
x.x.x.x vmi123456.server.net vmi123456 mail.domain.com
-
Reboot the server to apply the changes.
shutdown -r now