Network - Hostname (System's host name)

1 - About

A hostname is a name for a host (ie for the operating system).

The host name or computer name:

  • is a logical name for the host itself
  • is set in the operating system (used to initialize the OS kernel hostname)
  • is unique for the host (but it may have several logical name called IP name)

The operating system knows its own host under its host name.

3 - Hostname vs IP Name

A hostname is not an IP name because a host:

If the relevant host only has one network adapter, the host name and the IP name are normally identical. In this case, there is a unique relationship between the logical host name and the IP name. This means that this host can be addressed by other computers using its host name.

4 - Virtual

A Hostname may be virtual meaning that a service hosted on a system with the name foo can answer a request for the hostname bar.

This is used for instance to host several web server. See HTTP - Virtual Host (or Vanity hostnames)

5 - Value

5.1 - Long

The value of the hostname is a full qualified format.


hostname


myname.example.com

5.2 - Short

But you can query also the relative format.


hostname -s


myname

6 - Type

6.1 - Static

The static hostname is the hostname that is defined on the host itself (generally in a file).

Linux: it is configured in the /etc/hostname file.

If the static hostname is not set, the transient hostname is the default one.

6.2 - Transient

The Transient hostname represents the name that is set by network configuration such as:

  • HostFile
  • DHCP
  • or DNS

after a system boot.

If the Transient hostname is not set, the system uses the Static hostname.

7 - Management

7.1 - Query

You can query the hostname under UNIX or Windows by using the command hostname. Linux - Hostname (Kernel, Static)

7.2 - Default

If a static hostname is not set, the default hostname is the one defined by the network configuration and is also known as transient hostname

7.3 - Set

The hostname that is set is called the static hostname.

If not set, the hostname of the network configuration is taken, see default

The hostname should be set with a full qualified format.

To set it on linux, see Linux - Hostname (Kernel, Static)

8 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap