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

How to Change Network Interface name on Ubuntu

1265

To change Network Interface name on Ubuntu

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

Changing the Network Interface name

You can verify your network interface name using ‘ ifconfig’ command or ‘ ip a’ command.

root@linuxhelp1:~# ifconfig 
ens33     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:218283 errors:0 dropped:0 overruns:0 frame:0
          TX packets:134051 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:328932569 (328.9 MB)  TX bytes:9267462 (9.2 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:241 errors:0 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:19860 (19.8 KB)  TX bytes:19860 (19.8 KB)

Ubuntu has it network interface name as eth0 while in boot time it will automatically renamed to ens33 to verify this on use the below command.

root@linuxhelp1:~# dmesg | grep -i eth
[    1.768429] e1000 0000:02:01.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:31:3d:a8
[    1.768435] e1000 0000:02:01.0 eth0: Intel(R) PRO/1000 Network Connection
[    1.778278] e1000 0000:02:01.0 ens33: renamed from eth0

In order to change Network Interface name we require to edit grub configuration file as shown below.

root@linuxhelp1:~# vim /etc/default/grub

Add the following lines to it.

GRUB_CMDLINE_LINUX=" net.ifnames=0 biosdevname=0" 

Next regenerate grub configuration file.

root@linuxhelp1:~# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-64-generic
Found initrd image: /boot/initrd.img-4.4.0-64-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Done

Now open the network interface file by running the following commnad.

root@linuxhelp1:~# 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

Now that’ s all just you need to reboot your system and check network interface name once again with ‘ ifconfig’ command

root@linuxhelp1:~# 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)

The network interface has been changed now. Changing the network interface was quite easy wasn' t it? Having your network interface changed may help you a lot.

Tags:
ethan
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is the future of the NIC port?

A

"There doesn't appear to any doubt that the NIC standard has a very clear-cut advantage in transfer speeds and in how widely spread it is.

Q

"How can I see what it does and control its activity?

A

On Windows, open your Windows Control Panel, then click the icon or link to the Akamai NetSession Interface Control Panel.

Q

What is a NIC port and What does it do?

A

"A Port or Connector :
A Port or Connector on a Dell PC has either holes or a slot that matches the plug or device that you are connecting to the Port.
"

Q

What are the Different categories of cable and what do the different categories mean?

A

Co-Axial - Co-Axial came in Thinnet and Thicknet, both standards are now defunct and no longer in use. Twisted Pair - Twisted Pair came in several combinations and categories (CAT3, 4, 5, etc.).

Q

"How do I select the best cable for the job?

A

While Network Cables do look alike from the outside and they all have the same connectors, they can have significant differences on the inside. You can find out the type of cable you have by looking at the text printed on the side of the cable.

Related Tutorials in How to Change Network Interface name on Ubuntu

Related Tutorials in How to Change Network Interface name on Ubuntu

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to Change Network Interface name on Ubuntu

Related Forums in How to Change Network Interface name on Ubuntu

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in How to Change Network Interface name on Ubuntu

Related News in How to Change Network Interface name on Ubuntu

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
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 Ryan ?
how to use visual traceroute tool

Am using traceroute command to check for the route. i got this tool while surfing. So pls help me out installation and usage of Visual traceroute tool.

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.