How to Change Network Interface to Eth0 on Debian 9

How to Change Network Interface to Eth0 on Debian 9

On Debian 9, the name interface from the network card device (ethernet device) default has been changed to “ens33” from the previous name with the format “ethX”, namely “eth0”, “eth1”, “eth2” and so on according to the number and order of naming.

If you are already familiar with the “EthX” naming, you might be a little uncomfortable with this new network card naming format.

For that, you can change the naming format interface network card on Debian from “ens33” to “eth0” format as before using the following tutorial.

To check or check name interface from the network card (ethernet device) on the device, you can use a command like the following:

ip a

Then it will come out output about interface network on your device, you can see the name interface your network card as shown below:

Network Card (Ethernet Device) ens33
Network Card (Ethernet Device) ens33

As we can see in the output of the “ip a” command as shown above, the Debian 9 computer has ethernet device with the name “ens33”.

Actually naming settings interface network card (ethernet device) is performed when the system performs boot.

So to change the name interface from the network card (ethernet device) you can do this by slightly changing the GRUB configuration file.

Open the GRUB configuration file by entering the following command in command line interface your device or in Terminal:

nano /etc/default/grub

Don’t forget to add the “sudo” command at the beginning of the command if you login with user normal, not with root user. So that user The regular has the same access rights as root to change system configurations.

After the GRUB configuration file opens on text editor nano, look for the configuration line “GRUB_CMDLINE_LINUX” in the file, then add the line “net.ifnames=0 biosdevname=0” on the configuration line, so that the previous configuration line looks like this:

GRUB_CMDLINE_LINUX=””

It will be like this after adding the configuration:

GRUB_CMDLINE_LINUX=” net.ifnames=0 biosdevname=0”

When finished, save the configuration file using a keyboard combination CTRL+Othen press Enter. Exit the file by pressing the keyboard combination CTRL+Xthen press Enter.

Then update (generate) the GRUB configuration file by using the “grub-mkconfig” command as follows:

grub-mkconfig -o /boot/grub/grub.cfg

Wait for the process to finish. If so, then change the name interface network card (ethernet device) on the device via configuration network interface. Open the configuration file network interface by using a command like the following:

nano /etc/network/interfaces

Then change the network card naming format by replacing the word “ens33” in the configuration line to “eth0” so that the configuration line looks like this:

auto eth0
iface eth0 inet static

Or if you use DHCP, the configuration line will be like this:

auto eth0
iface eth0 inet dhcp

If so, then restart or restart your device using the command reboot as follows:

reboot

After the system has finished doing reboot and successfully log into the operating system again, then check if you have successfully changed the network card name (ethernet device) becomes in format “ethX” by using the following command:

ip a

Then it will come out output from the network card configuration (ethernet device) on the device so that it looks like this:

Network Card (Ethernet Device) eth0
Network Card (Ethernet Device) eth0

Then check if the name interface network card (ethernet device) on the device has changed to “eth0” as shown above.

If you have, it means you have successfully changed your name interface network card from “ens33” to “eth0” on Debian 9.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *