Bug 9842 - hostname -s returns localhost
hostname -s returns localhost
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-02-28 17:46 EST by rkz
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-28 18:01:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rkz 2000-02-28 17:46:11 EST
While the command 'hostname' returns the correct fully qualified name
'hostname -s' always returns 'localhost' as its answer
Comment 1 Jeff Johnson 2000-02-28 18:01:59 EST
This isn't a bug. The behavior depends on how your name service is set
up. Check your /etc/hosts.

FWIW, on my sparc64 named krusty.devel.redhat.com, hostname -s returns
krusty. My one-line /etc/hosts looks like
	127.0.0.1       localhost

and my /etc/nsswitch.conf has
	...
	hosts:      files nisplus nis dns

Note You need to log in before you can comment on or make changes to this bug.