Bug 9842 - hostname -s returns localhost
hostname -s returns localhost
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
Depends On:
  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:
Last Closed: 2000-02-28 18:01:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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       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.