We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags
See BLT.

/etc/HOSTNAME: Possibly the canonical (DNS) name of the local host

On many forms of UNIX and Linux this will be a single line text file containing the machine's canonical (official) hostname (as used by DNS or in /etc/hosts files).

The file can contain the FQDN (fully qualified domain name) (foo.example.com) or the short hostname (foo). There is no dominant standard on this, and it is a commonly debated point on some newsgroups and mailing lists.

On some systems it may appear as /etc/hostname (all lowercase). On Red Hat and similar systems the real hostname may be a setting in the /etc/sysconfig/network file. (Reading through the start up scripts, particulary /etc/init.d/rc.sysinit on a Red Hat system suggests that the hostname is set and reset several times during the boot sequence based on different criteria --- this is probably an historical artifact).

In general the host's name is found in some file and set using the hostname command. This can be seen with the command ''uname -n'' (--nodename) on a Linux system. Ultimately the hostname is set by the startup scripts, so it might differ from one distribution to another. Various programs may use various different ways to get the local hostname --- probably the best would be to use the ''uname()'' system call.

Contributors

  • () JimDennis - 22 Oct 2003
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Revision Comment

  • %DATE% —

Page Ratings

WebForm
PageStatus Believed Factual?
Topic revision: r2 - 22 Oct 2003 - 15:44:29 - RandyKramer
 
TWIKI.NET
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
See TWiki's New Look