- First, check your current hostname:
$ hostname server1 $ hostname --fqdn server1
At this point, both, the hostname and FQDN are set to
server1
.Optionally, change your hostname before proceeding to the next step.
- As an example now we will define the hostname
server1
as retrieved in the previous step to be an alias for the fully qualified domain namewww.linuxconfig.org
on the IP address1.2.3.4
. To do so edit the/etc/hosts
file by using thesudoedit /etc/hosts
command and add the following line:1.2.3.4 www.linuxconfig.org server1
NOTE
The order is important! The FQDNwww.linuxconfig.org
must precede the hostnameserver1
. - All done and no reboot is required. Check your FQDN by using the
hostname
command:$ hostname --fqdn www.linuxconfig.org
Alternatively, also check your domain name:
$ dnsdomainname linuxconfig.org
Most Popular Articles
Adding IPv6 connectivity to your server
On the servers provided by us, an IPv6 address is already preconfigured. However, on some...
Advantages of ZFS
ZFS as a rather new filesystem offers various advantages in comparison to regular filesystems...
Analysing log files in Windows and Linux
Everyone knows the scenario, you want to analyze an issue with your server or local computer but...
Basic information about our Webspace
Today we would like to give you some basic usage hints about our webspace packages. First of all,...
Can i use TUN/TAP ?
Yes our VPS are KVM or Vmware based and you have your own kernel so using TUN/TAP is no problem.