Linux command to remove virtual interfaces or network aliases
Q. How do I remove virtual interfaces such as eth0:1 or eth1:1?
A. Use ifconfig command. It is used to remove virtual interfaces or network aliases.
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.
Type the command to remove eth0:1:
# ifconfig eth0:1 down
/etc/sysconfig/network-scripts/ifcfg-ethX-range0 file
To remove interface permanently edit network configuration file stored at /etc/directory. For Red Hat / Fedora Core file stored in /etc/sysconfig/network-scripts/ directory. For Debian or Ubuntu Linux just edit file /etc/network/interfaces and remove the entries. For example open file called /etc/sysconfig/network-scripts/ifcfg-eth1-range0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0
You will see network aliases configuration:
IPADDR_START=192.167.1.5
IPADDR_END=192.167.1.100
CLONENUM_START=0
NETMASK=255.255.255.0
Just comment out everything or just rename the file:
# mv /etc/sysconfig/network-scripts/ifcfg-eth0-range0 /etc/sysconfig/network-scripts/working.ifcfg-eth0-range0.backup
Just restart network service:
# service network restart
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Clear all Linux / UNIX bash shell aliases
- How do I use shell aliases under Linux?
- Linux / UNIX: Virtual consoles (VC)
- Linux Virtual Private Network setup
- Linux: Find out which network card or NIC server is bind or running on
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: /etc/sysconfig/network-scripts/ifcfg-eth0-range0, aliases, configuration file, etc network, fedora core, ifconfig command, ifconfig eth0, interface, kernel, network configuration, network interfaces, network scripts, red hat fedora, service network restart, sysconfig, virtual interfaces ~ Last updated on: March 20, 2008



Recent Comments
Today ~ 2 Comments
Today ~ 37 Comments
Today ~ 46 Comments
Yesterday ~ 2 Comments
Yesterday ~ 9 Comments