Linux Host Name

Warning:

Do not simply create a host name. It should be a fully qualified domain name (FQDN). Linux will take the tertiary level as host name, e.g. myhost.mydomain.tld will yield the host name of myhost.

Webmin method:

wbm-351: Webmin log-in screen
Log in:
Log in to Webmin at https://localhost:10000 as root.


wbm-011: Webmin home page
Webmin home:
Click Networking icon at the top of page.


wbm-021: Networking options
Networking page:
Select Network Configuration


wbm-031: Host address
Host addresses:
Select Add a new host address

Note: Do not delete localhost


wbm-041: Create host address
Create Host Address:
Key in the following details for the new host:

IP Address: 192.168.1.101. (Use host IP even if it is dynamically assigned)

Hostnames: myhost.mydomain.tld. (This must be fully qualified domain name)

Click Create.


wbm-071: Apply configuration
Network Configuration page:
Go back to Network Configuration page

Click Apply Configuration (You will get a warning, continue. If you do not do this, you have to reboot or use the service manager to restart your network.)


Console method:

sys-01: Host name as appearing on console
Configuration can also be done from the console. Switch to root and issue the commands:
# echo myhost.mydomain.tld >> /etc/hosts

# /bin/hostname -F /etc/hosts

You should see the host name after that:
[user@myhost ~]$


Testing:

There is no necessity to test as you can see the host name from the console. If you still want to, point your browser to http://myhost. You should see the Apache test page or the home page of your phpBB site.