Linux and Ubuntu Modify host names

Source: Internet
Author: User

Original host Name: Jeepend-virtualbox

How to modify Linux:

1. Log in to the system with the root user using secure CRT or other means.
2. In terminal input: #hostname "Modified host name"
3. Modify hostname in/etc/sysconfig/network as "modified hostname"
4. Modify the "original hostname" as "modified hostname" in the/etc/hosts file
5.reboot, restart the system.

How to modify Ubuntu:

1. $su root//If you cannot su to root see Ubuntu switch to root with Su in the terminal
2. #vi/etc/hostname/Change the name to the name you want to change, such as MyName, VI will not use the reference [Linux/ubuntu] Vi/vim How to use the method to explain
3. Check the contents of/etc/hostname first, this is your Ubuntu hostname
Then edit the/etc/hosts file,
Input in terminal: Gksu gedit/etc/hosts
Under 127.0.0.1 localhost, enter: 127.0.1.1 myname

Linux and Ubuntu Modify host names

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.