• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ifrename Command Examples in Linux

by admin

The Linux kernel keeps track of network devices in the form of interfaces. Each interface is assigned a unique name, such as eth0, eth1, eth2, tr0, tr1, tr2, and so forth. The interface name is initially assigned by the device driver and kernel but may be overridden using ifrename.

The ifrename utility can be used to rename a network interface. The -i option specifies the old interface name, and -n sets the new name. To rename wlan0 to eth1, for example:

# ifrename -i wlan0 -n eth1

If you now check the interface information for the interface – wlan0, you would get below errro.

# ifconfig wlan0
wlan0: error fetching interface information: Device not found

ifrename Command Examples

1. To set the configuration file:

# ifrename -c /path/config 

2. To probe kernel modules before renaming interface:

# ifrename -p 

3. To rename specific interface:

# ifrename -i eth1

4. To specify the new name:

# ifrename -i eth1 -n eth8 

5. To enable takeover support:

# ifrename -t 

6. To enable udev output mode:

# ifrename -u 

7. To dry-run mode:

# ifrename -D 

8. To set to verbose mode:

# ifrename -V 

Filed Under: Linux

Some more articles you might also be interested in …

  1. lvcreate/lvremove Failed with Error “Can’t remove merging snapshot logical volume”
  2. keyctl Command Examples in Linux
  3. tlp: command not found
  4. iperf: command not found
  5. daemon: command not found
  6. gxl2gv Command Examples
  7. “git shortlog” Command Examples
  8. “mamba repoquery” Command Examples
  9. groupdel: command not found
  10. dcg: Drupal code generator

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright