1

When installing many different distributions of Linux, there is usually an option to set the domain name, as well as the hostname. Often the domain name can be left blank.

What does this options actually do? What is its purpose?

If I own a domain name, and I enter it at this point during the installation (or even change it after installation) what would be the difference compared to leaving it blank?

Additionally, what happens if I set it incorrectly? For example, I used a domain name which exists, but I do not own, or I used one that doesn't exist.

For example I could enter google.com as my domain name, but clearly I do not own this domain, so what would happen in this instance?

user3728501
  • 3,404
  • 9
  • 39
  • 54

1 Answers1

1

What does this options actually do? What is its purpose?

If I'm not wrong, it basically create an alias so that resolver can get your address by fully qualified host name. Usually it maps 127.0.0.1 to the domain name you have chosen in the /etc/hosts file. It may change the /etc/hostname file but I'm not sure, I usually configure it latter.

If I own a domain name, and I enter it at this point during the installation (or even change it after installation) what would be the difference compared to leaving it blank?

If you want the computer to join the domain you own, and leave it blank, you will just have to configure it later.

Additionally, what happens if I set it incorrectly? For example, I used a domain name which exists, but I do not own, or I used one that doesn't exist. For example I could enter google.com as my domain name, but clearly I do not own this domain, so what would happen in this instance?

At this point it affects only the local machine so you can choose anything you want. For example, if you set it to google.com, when trying to ping it from this machine, it will ping against 127.0.0.1. If you ping from another machine on the LAN, it will ask the DNS server and go to the correct address.

Things may change a little if this computer is set to be the DNS server of the LAN. In this case you computer may respond as the domain you have chosen but only to your LAN (it highly depends on the software and configuration used).

Outside the LAN, there is a whole authority chain to regulate this hostname/ip mapping.