课程: Linux System Engineer: Networking and SSH

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Get system hostname

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…

内容