Change the Host Name and IP address of ubuntu

Source: Internet
Author: User

Under terminal, enter:
Gedit/etc/hostname (in the root permission environment)

Sudo gedit/etc/hostname (in a non-root environment)

Change the host name. Save and exit!

Modify IP Address

Modify IP Address: su enters the root permission Environment
Command to modify the IP address to: ifconfig eth1 192.168.1.100

Add

Su enters the root permission Environment
CD/etc
VI hosts
192.168.1.100 master
192.168.1.101 node1
192.168.1.102 node2

How do we delete a blank line in Vim?
It must be used in the previous row, or SHIFT + J. The effect is to merge the next row with a space, which is useful when writing a program.

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.