Network - Hostname (System's host name)
Table of Contents
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.
2 - Articles Related
3 - Hostname vs IP Name
- can have several IP names by IP address
- but have only one host name.
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
5.2 - Short
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
- See also the DNS definition