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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ifrename: command not found

by admin

Using ifrename is the easiest way to make sure your network cards keep the correct configurations on Linux systems. Usually, interfaces will come up in the same order, and the kernel will assign them the same names, but sometimes this can change (e.g., after a kernel upgrade or adding another network card). Your nice Linux firewall won’t work with the network interfaces mixed up, so it is best to nail them down. An additional bonus is you can easily name your interfaces anything you want with ifrename. You might give them descriptive names like “lan” and “wan,” instead of eth0 and eth1.

If you encounter below error:

ifrename: command not found

you may try installing below package as per your choice of distribution.

Distribution Command
Debian apt-get install ifrename
Arch Linux pacman -S ifrename
Kali Linux apt-get install ifrename
CentOS yum install ifrename
Fedora dnf install wireless-tools-1
Raspbian apt-get install ifrename

To get more help on the ifrename command, refer to the man page:

$ man 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

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. deluser Command Examples in Linux
  2. dnsspoof: command not found
  3. avifenc Command in Linux with Examples
  4. Understanding TCP Wrappers (/etc/hosts.allow & /etc/hosts.deny) in Linux
  5. nautilus Command Examples in Linux
  6. How to set “max_report_luns” and “max_luns” on CentOS/RHEL 7 to scan more than 16,383 LUNs
  7. autopkgtest: command not found
  8. how to rotate Tang Server Keys and update the Clevis Client
  9. gs: command not found
  10. How to disable SSH host key checking in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright