Most of my linodes have the same hostname as the label given to them, however some are 'localhost'.
I understand how to set the hostname, but was wondering how some of these got auto set while others didn't?
There are a lot of different variables that could affect what you're seeing as your "default" hostname:
- The distribution you're using
- The data center your Linode is created in
- Are you using a StackScript when creating your Linode?
- Are you using a One-Click App to deploy your Linode?
- Are you providing a public key when creating your Linode?
I tried to recreate this, and I was getting different results depending on the combination of these and other factors. That said, as long as you're following the Getting Started and Securing Your Server guides, your hostname will get changed during the process. You can also check out our System Administrator guide for more details on configuring your hostname to work with your IP and domain name in the /etc/hosts file.
I wish I had a more concrete answer for you, but I hope this helps!