Some FQDN questions

Hello all,

I have just gotten into Linode and setting up my own server. I'm new to system/dev-ops so the guides have been helpful, however I'm confused on one detail.

I've set my hostname which seems to just be a nice identifier for the machine.

I've taken a look at the /etc/hosts file and the recommendation of an FQDN is myhostname.somedomain.com. My question is when do I need this?

My hosts file has:

127.0.0.1 localhost
127.0.1.1 myhostname

The guide on hosts specifically mentions that loopback domain being set to my hostname to avoid a sudo error. However it also mentions the FQDN as something to do instead of/addition to setting that it seems? Eventually I plan to purchase a domain name for my web server. Once I do, do I need to come back and add a line````
myhostname.domainibuy.net

It seems I can reach my linode remotely now with the IP or that special <u>ID.members.linode.com</u> address they've setup. That seems to work great while this is under development. In fact, the hosts file previously had:

127.0.1.1 ubuntu.members.linode.com ubuntu

````

Which I've removed, since it seems to relate to nothing aside from ubuntu being the initial hostname. Should I add that back for the loopback domain but with my hostname instead of ubuntu?

Thanks for the help!

3 Replies

You mentioned your hosts file now looks like this:

127.0.0.1 localhost
127.0.1.1 myhostname

You can leave it this way and then you can use "myhostname" whenever you are prompted for your hostname.

Then later on when you have bought a domain you can go and update all the "myhostname"s with your new domain name.

It is a good thing to have a FQDN properly configured; but you generally need it configured when other software relies on it, the main case being a mail server, and very often proprietary software. If hostname -f returns a FQDN, and that FQDN is resolvable on the box, you're set.

how do i change loopback domain

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct