LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-03-2009, 09:34 AM   #1
zerobane
Member
 
Registered: Jan 2006
Posts: 41

Rep: Reputation: 16
best pratice for hostname? FQDN vs short?


What is the best pratice for hostnames and why?

my typical server setup for rhel4 or rhel5 installs:

/etc/sysconfig/network
hostname=hostname.domain.com

/etc/hosts/
1.1.1.1 hostname.domain.com hostname

/etc/resolv.conf
domain domain.com
search domain.com
nameserver 1.1.2.3

Any reasons you should not be using the fqdn?
 
Old 02-03-2009, 01:45 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,981
Blog Entries: 5

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
FQDN for most uses. You can always get shortname by adding it to hosts with a shortname alias to FQDN or adding search domain to your /etc/resolv.conf for name lookups.

That is to say you always want to name the box with FQDN but don't want to have to always type FQDN to access the box. Aliases and search domains allow you to do both.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hostname, fqdn, /etc/hosts setup [GOD]Anck Slackware 9 07-20-2010 04:51 PM
nn and fqdn andrew.46 Slackware 0 01-02-2009 10:53 PM
Moved Subnets: Now cannot resolve short name, but FQDN works fine? hevnsnt Linux - Networking 5 12-29-2006 01:34 PM
ip as my fqdn? sortia Linux - Networking 6 04-27-2005 09:46 AM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM


All times are GMT -5. The time now is 06:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration