Ask Your Question
1

How to change NIC name?

asked 2015-09-17 09:28:42 -0600

leoj782 gravatar image

Hello,

My fedora22 NIC name is enp0s7 and I tried to change it to eth0 in /etc/sysconfig/network-scripts/ifcfg-enp0s7, however i find the name is still enp0s7 via ifconfig cmd. How can I do this? Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-09-17 09:57:47 -0600

florian gravatar image

Quoting from here:

You basically have four options:

  1. You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was called 80-net-name-slot.rules in release v197 through v208)
  2. You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own udev rules file and set the NAME property for the devices. Make sure to order it before the default policy file, for example by naming it /etc/udev/rules.d/70-my-net-names.rules
  3. You alter the default policy file, for picking a different naming scheme, for example for naming all interface names after their MAC address by default: cp /usr/lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, then edit the file there and change the lines as necessary.
  4. You pass the net.ifnames=0 on the kernel command line (since v199)

Also, Fedora Documentation is talking about Disabling Consistent Network Device Naming: https://docs.fedoraproject.org/en-US/...

edit flag offensive delete link more

Comments

1

Thanks. I have solved the problem by adding "DEVICE=eth0" in the /etc/sysconfig/network-scripts/ifcfg-enp0s7. In my system there were not any file in /etc/udev/rules.d/ so I am not sure whether your suggestion did work for me.

leoj782 gravatar imageleoj782 ( 2015-09-19 08:59:13 -0600 )edit
1

answered 2015-09-18 04:20:10 -0600

braydenberger gravatar image

Click you name on the top left screen. And find the update profile button, and click it then you could modify it.

edit flag offensive delete link more

Comments

Hi Braydenberger. Welcome to ask.fedora!

Your answer is related to the nick name of a user's profile here on this website, right? I guess @leoj782 meant NIC name which stands for Network Interface Controller, here meaning the name of your lan/wifi card...

florian gravatar imageflorian ( 2015-09-18 09:20:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-17 09:28:42 -0600

Seen: 1,003 times

Last updated: Sep 17 '15