"Original" Modify the CentOS IP address

Source: Internet
Author: User

First, temporary modification

Command: ifconfig eth0 192.168.1.147

After restarting or shutting down, the IP address will revert to the state before the change.

Second, permanent modification

Command:

vi/etc/sysconfig/network-scripts/ifcfg-eth0device=eth0           # Nic type=ethernet         # Ethernet Type Code Onboot=yes            # boot load nm_controlled=no      #Network Manger parameters bootproto= None        # nic type ipaddr=10.10.51.241PREFIX=24GATEWAY=10.10.51.254 DNS1=202.106.0.60DNS2=114.114.114.114

Then restart the Network service:

/etc/rc.d/init.d/network Restart    # Restart Network Service

If your virtual machine is cloned, you also need to clear the following information:

>/etc/udev/rules.d/70-persistent-net.rules        #/etc/sysconfig/network-service/ifcfg-eth0          #


--Solemn statement: This article is only for the author's personal notes, please do not reprint! ——

"Original" Modify the CentOS IP address

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.