国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > CentOS > 正文

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

2020-06-21 13:25:12
字體:
供稿:網(wǎng)友

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

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

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

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

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

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

2. 修改grub

Ruby Code復(fù)制內(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復(fù)制內(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)卡名字的方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對VEVB武林網(wǎng)網(wǎng)站的支持!


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 平邑县| 鸡西市| 怀来县| 平昌县| 吉首市| 萨迦县| 潞西市| 广饶县| 石渠县| 台南市| 奎屯市| 东乌珠穆沁旗| 孝义市| 波密县| 平塘县| 昌宁县| 肇东市| 刚察县| 革吉县| 常州市| 漾濞| 子长县| 桂东县| 台湾省| 张家港市| 施甸县| 永宁县| 涿州市| 通河县| 延津县| 宿松县| 屏东市| 梅州市| 长葛市| 鹿泉市| 徐闻县| 赤壁市| 连州市| 蓬莱市| 闸北区| 永德县|