From the course: Linux System Engineer: Networking and SSH

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Get system hostname

Get system hostname

From the course: Linux System Engineer: Networking and SSH

Start my 1-month free trial

Get system hostname

- [Instructor] There are three types of hostnames, static, transient, and pretty. The static hostname is the one stored in /etc/hostname and can be read with a text viewer. The transient hostname is a dynamic hostname used by the kernel. By default, when the system starts, it's set to the static host name, but it can change at any time by user or service such as DHCP or MDNS. The pretty hostname is a free form UTF8 string of text that is presented to the user. The hostname can be up to 64 characters in length, has to be composed of 7-bit ASCII lowercase characters, and cannot have spaces or dots. Red Hat recommends both the static and transient hostnames match the fully qualified domain name or FQDN, used by DNS. Red Hat also recommends that the hostname conforms to the format of DNS name labels, even though it's not necessary from a machine perspective. The hostname CTL command enforces that hostnames only consist of lowercase a through z, uppercase a through z, the numbers zero…

Contents