Centos 7 Changing the name of the NIC

Source: Internet
Author: User

1. View IP Address

[[Email protected] ~]# IP A
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
Valid_lft Forever Preferred_lft Forever
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2: eno16777736 : <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0C:29:20:53:B3 BRD FF:FF:FF:FF:FF:FF
inet 192.168.1.102/24 BRD 192.168.1.255 scope Global Dynamic eno16777736
Valid_lft 6568sec preferred_lft 6568sec
Inet6 FE80::20C:29FF:FE20:53B3/64 Scope link
Valid_lft Forever Preferred_lft Forever
3:eno33554976:<BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc Pfifo_fast State up Qlen 1000
Link/ether 00:0C:29:20:53:BD BRD FF:FF:FF:FF:FF:FF
inet 192.168.1.113/24 BRD 192.168.1.255 scope Global Dynamic eno33554976
Valid_lft 6569sec preferred_lft 6569sec
Inet6 FE80::20C:29FF:FE20:53BD/64 Scope link
Valid_lft Forever Preferred_lft Forever

2. Modify the grub file to add a portion of the red font to the file

[Email protected] ~]# Vim/etc/sysconfig/grub

Grub_timeout=5
Grub_distributor= "$ (SED ' s, release. *$,,g '/etc/system-release)"
Grub_default=saved
Grub_disable_submenu=true
grub_terminal_output= "Console"
grub_cmdline_linux= "Rd.lvm.lv=vg00/swap Vconsole.font=latarcyrheb-sun16 crashkernel=auto vconsole.keymap=us Rd.lvm.lv=vg00/root rhgb quiet net.ifnames=0 biosdevname=0"
Grub_disable_recovery= "true"

3. Build a new img file

[Email protected] ~]# Grub2-mkconfig-o/boot/grub2/grub.cfg
Generating GRUB configuration file ...
Found Linux Image:/boot/vmlinuz-3.10.0-229.7.2.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-229.7.2.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-229.4.2.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-3.10.0-229.1.2.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-229.1.2.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-3.10.0-123.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-123.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-3.10.0-123.13.2.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-123.13.2.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-0-rescue-f16a3c5e4d1949dd87cf7fdc31231925
Found initrd Image:/boot/initramfs-0-rescue-f16a3c5e4d1949dd87cf7fdc31231925.img
Done

4. Restart the server

[email protected] ~]# reboot

5. Re-view the IP address of the server

[[Email protected] ~]# IP A
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
Valid_lft Forever Preferred_lft Forever
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0C:29:20:53:B3 BRD FF:FF:FF:FF:FF:FF
inet 192.168.1.102/24 BRD 192.168.1.255 scope Global Dynamic eth0
Valid_lft 7150sec preferred_lft 7150sec
Inet6 FE80::20C:29FF:FE20:53B3/64 Scope link
Valid_lft Forever Preferred_lft Forever
3:eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0C:29:20:53:BD BRD FF:FF:FF:FF:FF:FF
inet 192.168.1.113/24 BRD 192.168.1.255 scope Global Dynamic eth1
Valid_lft 7150sec preferred_lft 7150sec
Inet6 FE80::20C:29FF:FE20:53BD/64 Scope link
Valid_lft Forever Preferred_lft Forever

This article is from the "Cloud Life" blog, make sure to keep this source http://ovcer.blog.51cto.com/1145188/1668617

Centos 7 Changing the name of the NIC

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.