Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3914
  • Last Modified:

logical and physical hostname

Hey how can I find logical and physical host name of a unix server. I really appreciate your help.
0
hussainkhan22
Asked:
hussainkhan22
  • 2
2 Solutions
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi hussian,

I'm not sure what you mean by "physical host name".  Can you elaborate?

The logical host name is read or set by the (what else) hostname command.

  hostname


Kent
0
 
hussainkhan22Author Commented:
I mean how can we know whether the name mentioned in host name is physical name or logical name
0
 
Kent OlsenData Warehouse Architect / DBACommented:

The server doesn't "know" the physical name, it returns the logical name.

I would expect the logical name to also be in the /etc/hosts file.  Either on the line the defines "localhost" or the line that defines the local machine's IP address.


Kent
0
 
TintinCommented:
There's no such thing as physical and logical hostname.  

There is only one hostname per host.

If you type in

hostname

or

uname -n

you'll see what the hostname is set to.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now