Linux server name modification

Source: Internet
Author: User
In linux, you can run the following command to view the host name of ubuntu by modifying the server name: www.2cto. to modify the host name of comhostname, you must change the two files:/etc/hostname/etc/hosts. in the hostname file, change the original host name to a new one. In the hosts file...
In linux, you can run the command www.2cto.com hostname to modify the host name. you need to change the two files:/etc/hostname/etc/hosts in the hostname file, change the original host name to a new one. In the hosts file, you can change the original host name resolved in 127.0.0.1 to the new host name. modify the linux server name # vi/etc/sysconfig/network NETWORKING = yes HOSTNAME = yourname // modify hostname 2 here. modify the name in/etc/hosts # vi/etc/hosts 127.0.0.1 localhost. localdomain localhost 127.0.0.1 yourname // modify hostname 3 here. finally, run the command # hostname ***** // ***** to change the hostname. after the host is restarted, the host name is restored to the original one. To change the host name permanently, modify the/etc/sysconfig/network file. Command # uname-n # Centos
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.