Linux CentOS7.0 (02) Modify host name and IP address

Source: Internet
Author: User

In CentOS, there are three definitions of host names: static, transient (transient), and flexible (pretty).

  • The "Static" hostname, also known as the kernel hostname, is the host name that the system automatically initializes from/etc/hostname at startup.
  • A "transient" hostname is a host name that is temporarily assigned when the system is running, for example, through DHCP or MDNs server assignment. The static hostname and transient host name comply with the same character restriction rules as the Internet domain name.
  • The "flexible" hostname allows the use of a host name that is free form (including special/whitespace characters) to be displayed to end users (such as LINUXIDC).
First, view the host name

[Email protected] ~]# Hostnamectl

If you are viewing only static, transient, or flexible host names, you can use the--static,--transient, or--pretty options respectively.

Second, modify the host name

Linux CentOS7.0 (02) Modify host name and IP address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.