A FQDN is a hostname along with a domain name after it. Using the command with the set-hostname parameter will set the same name for all three hostnames: the high-level pretty hostname, which might include all kinds of special characters (for example, Lennart's Laptop), the static hostname which is used to initialize the kernel hostname at boot (for example lennarts-laptop), and the transient hostname, which is a default received from network configurations.įollowing this, we set the FQDN of our server. This command can set three different types of hostnames. In the first stage of the process, we changed the current hostname used by our server with the hostnamectl command. So, what have we learned from this experience? There are several public DNS servers available in a later process, we will build our own DNS service. A DNS server is used to translate domain names to IP addresses. It is restricted to alphanumeric-based characters, and making a change to your server’s hostname can be achieved by using the hostnamectl command. To test if we can resolve domain names to IP addresses using our static DNS server addresses, use the following command:Ī hostname is a unique label created to identify a machine on a network. On a successful reboot, you can now check your new hostname and FQDN by typing the following commands and waiting for the response: To do this, return to your console and type: When complete, save and close your file before rebooting your server to allow the changes to take immediate effect. Replace the content of the file with the following: Next, we will open the nf file, which is responsible for configuring static DNS server addresses that the system will use: home, and by using these references you will avoid any confusion with the typical. For example, if your server’s hostname was called jimi, (with an IP address of 192.168.1.100, and a domain name of ) your final line to append will look like this:įor a server found on a local network only, it is advisable to use a non-Internet based top-level address.
For example, if you want to call your server jimi, you would type (change appropriately):