• 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. How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8
  2. fmt Command Examples in Linux
  3. lsof: command not found
  4. How to Enable Verbose Logging for VSFTPD
  5. chntpw Command Examples in Linux
  6. clear: Clears the screen of the terminal (Command Examples)
  7. Features of the “Btrfs” Filesystem
  8. mkfs.fat: command not found
  9. blkdiscard: command not found
  10. clang-tidy: An LLVM-based C/C++ linter to find style violations, bugs and security flaws through static analysis

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright