FAQ4: Hostnames short or long?
nagger 100000MRSJ Comments (6) Visits (14985)
When I log on to my home machine being AIX,of course, and type hostname I get:
nag@blue:/home/nag$ hostname blue
I get this because when I set the hostname in smitty it looks like this:
* HOSTNAME [blu
If you hit F1 in the hostname field of smitty it says:
If the host uses a domain name server for name resolution, the host name must contain the full domain name.
This is NOT optional and is NOT a style option.
Don't use Underscore
The other common mistake is using the underscore character "_" in the hostnames like "blue_is_cool". The underscore is NOT allowed. I often use this style, for example, in Windows file names as I hate the use of spaces in filenames but you must not carry that in to hostnames (like me and my team did at one point and ran into all sorts of bizarre problems on the DNS (Domain Name Server).
If you must break up your hostnames in to parts then the hyphen like "blue-is-cool" is allowed.