Linux host name hostname settings

Source: Internet
Author: User
Linux host name hostname setting in Linux is troublesome, and even modifying the host name is no exception. After Linux is installed, its default host name is localhost. Three steps are required to modify the Linux host name. Use hostname to modify the current host name. Hostnamenew-host... linux host name hostname setting in Linux is troublesome, even modifying the host name is no exception. After Linux is installed, its default host name is localhost. Three steps are required to modify the Linux host name. Use hostname to modify the current host name. Hostname new-hostname: modify the/etc/sysconfig/network configuration file so that the new host name can be used at the next restart. Open the/etc/sysconfig/network file and modify HOSTNAME = new-hostname.domainname. The modified/etc/sysconfig/network file is as follows: NETWORKING = yesHOSTNAME = new-hostname.localdomain modify the local domain name resolution file/etc/hosts so that local applications can resolve the new host name. Edit File:/etc/hosts modify: xxx. xxx. xxx. xxx new-hostname.domainname new-hostname (here xxx represents the local network address, can also be the loopback address 127.0.0.1) after the modification of/etc/hosts file is as follows: 127.0.0.1 localhost. localdomain localhost127.0.0.1 new-hostname.localdomain new-hostname
Related Article

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.