equivalent for ifconfig dev

marshelgot asked:

When I need to create a temporary bridge with interface on Linux I would use the following:

brctl addbr br0
brctl addif br0 eth0
ifconfig eth0
ifconfig br0 netmask
ifconfig br0 up

I have been updating my process to use the ip command, However, I do not find the equivalent for removing the IP stack (ifconfig eth0 via the ip command

I have tried the following:

ip addr add dev eth0
ip addr add dev eth0

but it does not work to remove the existing ip on that device.

would anyone happen to know if this is possible with the ip command

My answer:

You can’t delete an IP address with the add command!

If you want to delete an IP address from an interface, you del it.

ip addr del dev eth0

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.