You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to Remove an IP Address from a Network Interface in Linux

Practice



There's nothing simpler in Linux network configuration than setting an IP address with the ifconfig utility. Changing it isn't hard either. But at some point I ran into the question - how the heck do I remove it? I mean, with ifconfig I can reassign the IP address, and ifconfig lets you remove an IPv6 address, but what do you do with IPv4?


So, to remove an IP address from a network card in Linux, all we need to do is run this command:
$ sudo ip addr del AA.BB.CC.DD/NN dev ethX

or
$ sudo ifconfig ethX 0.0.0.0
(thanks to the comment below)

where instead of AA.BB.CC.DD/NN you specify the IP address to be removed, and instead of ethX - the name of the network interface

Comments

Guest 31-10-2020
работает
Василий 21-10-2020
например чтобы освободить ип, чтобы не было конфликтов или изменить его, с переназначением по DHCP
Арман 21-10-2020
ты просто чудо
Лина 31-08-2020
Чтобы взломать Ентернеты
Костя 21-04-2020
а для чего нужно удалят ип адрес?

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system