If you are looking for software to use, go to Huajun Software Park! software release
Location: front pageTutorial strategyTutorialComputer software tutorials Linux multi-network...

How to change the name of multiple network cards in Linux?

Author: Xiaoqiao Liushui Date: 2017-05-17

Ubuntu For Linux
Ubuntu For Linux-14.10

operating system Storage: 1158720KB Time: 2014-04-22

Software Introduction: Ubuntu is a freely distributed and open source Linux-based operating system designed for humans, humans who have no previous experience with Linux...

Download now

When multiple network cards are installed on a Linux system, changing the name is not that simple. Faced with this situation of multiple network cards, the editor of Huajun will share with you how to change the name of multiple network cards in Linux? , let’s learn how the process works together! If you like it, hurry up and collect it~. .

53-150104140UU01.jpg

1. There are 4 network cards installed on a Linux machine, two built-in ones and two extended ones. After installing the system, the two extended ones are identified as eth0 and eth1. I want to change the two system ones to eth0 and eth1.

2. Change the module alias in the /etc/modprobe.conf file

For example alias eth0 e1000e

alias eth1 e1000e

Change to alias eth2 e1000e

alias eth3 e1000e

3. Change the name of the network card configuration file to ifcfg-eth0, that is, swap it

mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-temp0

mv /etc/sysconfig/network-scripts/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-temp2

mv /etc/sysconfig/network-scripts/ifcfg-temp2 /etc/sysconfig/network-scripts/ifcfg-eth0

mv /etc/sysconfig/network-scripts/ifcfg-temp0 /etc/sysconfig/network-scripts/ifcfg-eth2

4. Change the configuration file and change DEVICE=eth0 accordingly.

5. Reload the network card module

modprobe eth0

modprobe eth1

modprobe eth2

modprobe eth3

6. Restart the network service /etc/init.d/network restart. I tried restarting the network but it didn’t work. Then I restarted the machine.

7. Check ifconfig is normal

Compare the mac and see if it is running to judge.

The above is the editor's summary of the method of changing the name of multiple network cards in Linux. The method introduced in this article is only for Linux systems. Other systems can be used as a reference. For CentOS, please see System Home CentOS 6.X for details on how to change the name of the network card.

Related articles