欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

centos7修改網(wǎng)卡名字的方法

  發(fā)布時間:2016-10-08 14:54:12   作者:佚名   我要評論
很多同學在裝完centos7,發(fā)現(xiàn)網(wǎng)卡接口名字變了, 不再是eth*或者em*了,而是ens*,但是很不利于維護,下面小編給大家介紹下centos7修改網(wǎng)卡名字的方法,非常不錯,一起看看吧

很多同學在裝完centos7,發(fā)現(xiàn)網(wǎng)卡接口名字變了, 不再是eth*或者em*了,而是ens*,但是這樣統(tǒng)一維護起來就比較麻煩,那么怎么修改呢,請看下文:

1. 拷貝網(wǎng)卡接口配置文件

Ruby Code復制內(nèi)容到剪貼板
  1. # cd /etc/sysconfig/network-scripts/   
  2. # cp ifcfg-ens32 ifcfg-eth0  

編輯ifcfg-eth0, 將文件中的ens32改為eth0

Ruby Code復制內(nèi)容到剪貼板
  1. # cd /etc/sysconfig/network-scripts/   
  2. # cp ifcfg-ens32 ifcfg-eth0  

編輯ifcfg-eth0, 將文件中的ens32改為eth0

2. 修改grub

Ruby Code復制內(nèi)容到剪貼板
  1. # vim /etc/default/grub   
  2. 修改GRUB_CMDLINE_LINUX 行內(nèi)容,在后面加上 net.ifnames=0 biosdevname=0,如下:   
  3. GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"  
  4. # vim /etc/default/grub   
  5. 修改GRUB_CMDLINE_LINUX 行內(nèi)容,在后面加上 net.ifnames=0 biosdevname=0,如下:   
  6. GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"  

3. 重新生成grub.cfg文件

Python

Ruby Code復制內(nèi)容到剪貼板
  1. # grub2-mkconfig -o /boot/grub2/grub.cfg   
  2. Generating grub configuration file ...   
  3. Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64   
  4. Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img   
  5. Found linux image: /boot/vmlinuz-0-rescue-cbe15acd3ca347f4a373c8f4adaf2619   
  6. Found initrd image: /boot/initramfs-0-rescue-cbe15acd3ca347f4a373c8f4adaf2619.img   
  7. done   
  8. # grub2-mkconfig -o /boot/grub2/grub.cfg   
  9. Generating grub configuration file ...   
  10. Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64   
  11. Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img   
  12. Found linux image: /boot/vmlinuz-0-rescue-cbe15acd3ca347f4a373c8f4adaf2619   
  13. Found initrd image: /boot/initramfs-0-rescue-cbe15acd3ca347f4a373c8f4adaf2619.img   
  14. done  

4. reboot 重啟

以上所述是小編給大家介紹的centos7修改網(wǎng)卡名字的方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關文章

最新評論