Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What is the right thing to set a computer's hostname to? (/bin/hostname, /etc/hostname, sethostname(2), etc.)

I usually just use the "name" part, and it works perfectly (for me at least), but I've seen it implied in some places that I should use the entire "name.domain.tld" instead... which just doesn't feel "right" for me.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Just the name as you already do. A hostname shouldn't contain any domainname.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.