• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to change Network Interface Name on Debian 11.3

  • 00:45 lsb_release -a
  • 00:58 sudo ifconfig
  • 01:25 dmesg | grep -i eth
  • 01:47 vim /etc/default/grub
  • 02:17 sudo grub-mkconfig -o /boot/grub/grub.cfg
  • 02:54 vim /etc/network/interfaces
  • 04:18 sudo init 6
  • 04:33 sudo ifconfig
7405

To Change Network Interface Name on Debian 11.3

Introduction:

Generally, a Network interface is named either eth0, eth1, eth2 and etc. The network interface name depends on the Ethernet connections available and its number should vary from eth0 to eth1. Once Debian 11.3 is installed, the network interface name gets changed from eth0 to ens33. It is quite easy to change the Network Interface name on your Debian machine and this article can help you with that.

Procedure:

Step 1: Check the OS Version by using the below command

[root@linuxhelp: ~#] lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11	
Codename:	bullseye

Step 2: Verify your network interface name using ‘ifconfig’ command or ‘ip a’ command.

[root@linuxhelp: ~#] sudo ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.6.127  netmask 255.255.254.0  broadcast 192.168.7.255
        inet6 fe80::20c:29ff:fef7:6f3e  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:f7:6f:3e  txqueuelen 1000  (Ethernet)
        RX packets 20010  bytes 27736289 (26.4 MiB)
        RX errors 19  dropped 0  overruns 0  frame 0
        TX packets 8563  bytes 611840 (597.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  base 0x2000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 48  bytes 4461 (4.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 48  bytes 4461 (4.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Step 3: Debian has it network interface name as eth0 while in boot time it will automatically renamed to ens33 to verify this using the below command.

[root@linuxhelp: ~#] dmesg | grep -i eth
[    4.499644] pcnet32: eth0: registered as PCnet/PCI II 79C970A
[    4.652648] pcnet32 0000:02:01.0 ens33: renamed from eth0

Step 4: In order to change Network Interface name, we require to edit grub configuration file by using the below commands.

[root@linuxhelp: ~#] vim /etc/default/grub

Add the following lines to it.
GRUB_CMDLINE_LINUX=" net.ifnames=0 biosdevname=0" 

Step 5: Next regenerate grub configuration file by using the below command.

[root@linuxhelp: ~#] sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-16-amd64
Found initrd image: /boot/initrd.img-5.10.0-16-amd64
Done

Step 6: Now open the network interface file by running the below command.

[root@linuxhelp: ~#] vim /etc/network/interfaces
Add the following content to it.
auto eth0
iface eth0 inet static
           address 192.168.5.152
           netmask 255.255.255.0
           dns-nameservers 8.8.8.8
           gateway 192.168.5.1

Step 7: Next reboot your system and check network interface name once again with ‘ipconfig’ command.

[root@linuxhelp: ~#] sudo init 6
[root@linuxhelp: ~#] sudo ifconfig
eth0     Link encap:Ethernet  HWaddr 00:0c:29:31:3d:a8  
          inet addr:192.168.5.152  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::fde3:373:9789:718f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:259066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:157287 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:390546979 (390.5 MB)  TX bytes:10853428 (10.8 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:245 errors:0 dropped:0 overruns:0 frame:0
          TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:20220 (20.2 KB)  TX bytes:20220 (20.2 KB)

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to change Network interface name Debian 11.3. Your feedback is much welcome

Tags:
mason
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is ifconfig for Linux?

A

Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. If no arguments are given, ifconfig displays the status of the currently active interfaces.

Q

What is the IP address from ifconfig?

A

The system will display all network connections – including connected, disconnected, and virtual. Look for the one labeled UP, BROADCAST, RUNNING, or MULTICAST to find your IP address. This lists both IPv4 and IPv6 addresses.

Q

What is IP in Linux?

A

Ip command in Linux is present in the net tools which are used for performing several network administration tasks. IP stands for Internet Protocol. This command is used to show or manipulate routing, devices, and tunnels.

Q

What are the 4 types of IP addresses?

A

An internet protocol (IP) address allows computers to send and receive information. There are four types of IP addresses: public, private, static, and dynamic.

Q

What is eth0 used for?

A

eth0—Use the eth0 interface to configure the virtual IP (VIP) address of fabric and the IP address of the node as well as to access the managed devices. The VIP address and the IP address of the node should be on the same subnet.

Related Tutorials in How to change Network Interface Name on Debian 11.3

Related Tutorials in How to change Network Interface Name on Debian 11.3

How to install Gparted on Debian 9.0
How to install Gparted on Debian 9.0
Sep 13, 2017
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Sep 19, 2018
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to install qBittorrent on Debian 9.0
How to install qBittorrent on Debian 9.0
Sep 8, 2017
How to Install FileZilla in Debian
How to Install FileZilla in Debian
Nov 29, 2016
How to install Nmap on Debian 9.0
How to install Nmap on Debian 9.0
Sep 9, 2017
How to Install Laravel in Debian
How to Install Laravel in Debian
Dec 7, 2016
How to install Wireshark in Debian
How to install Wireshark in Debian
Mar 18, 2017

Related Forums in How to change Network Interface Name on Debian 11.3

Related Forums in How to change Network Interface Name on Debian 11.3

MariaDB
ryan class=
E: Unable to locate package mariadb-server
Sep 18, 2017
Linux
AadrikaAnshu class=
How to add timestamps to history On Any Linux Machine
Jun 18, 2019
vim
jacob class=
Change true vi-compatible editor from Debian Vim-compatible
Nov 8, 2021
debian
anandaamatya class=
RedNotebook on Debian buster
Jun 30, 2020
Ubuntu
Kirin class=
Videos Always Micro-Shutter
Mar 8, 2019
debian
luke class=
workbench for debian
May 26, 2017
debian
teddybarax class=
Softwae installation problem
Aug 24, 2020
debian
colbyvance class=
Trouble Installing Debian 10.8.0 (Gnome)
Feb 28, 2021

Related News in How to change Network Interface Name on Debian 11.3

Related News in How to change Network Interface Name on Debian 11.3

Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Feb 28, 2017
Mass update of Jessie - A better alternative to new version?
Mass update of Jessie - A better alternative to new version?
May 8, 2017
NetworkManager 1.18 Released So Soon For Linux Bridge
NetworkManager 1.18 Released So Soon For Linux Bridge
Apr 25, 2019
Debian 9.2 ‘Stretch’ OS is here, download distro now
Debian 9.2 ‘Stretch’ OS is here, download distro now
Oct 9, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.