How to change FQDN ( domain name ) on Ubuntu 20.04

  1. First, check your current hostname:
    $ hostname
    server1
    $ hostname --fqdn
    server1

    At this point both, the hostname and FQDN is set to server1.

    Optionally, change your hostname before proceeding to the next step.

  2. As an example now we will define hostname server1 as retrieved in the previous step to be an alias for the fully qualified domain name www.linuxconfig.org on the IP address 1.2.3.4. To do so edit the /etc/hosts file by using the sudoedit /etc/hosts command and add the following line:
    1.2.3.4 www.linuxconfig.org server1

    NOTE
    The order is important! The FQDN www.linuxconfig.orgmust precede the hostname server1.

  3. All done and no reboot required. Check your FQDN by using the hostname command:
    $ hostname --fqdn
    www.linuxconfig.org
    

    Alternatively, also check your domain name:

    $ dnsdomainname 
    linuxconfig.org
  • 3211 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

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 of your server or local computer but...

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.

Changing the Windows Administrator password – The easy way

Today we are going to show you how to change your Windows Administrator password the easy...

Command ‘curl’ not found on Ubuntu 20.04

The following error message may appear on your terminal hinting the unavailability of the curl...