Skip to content

Instantly share code, notes, and snippets.

@ibndias
Last active December 28, 2022 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibndias/116a420adf8919975ea33c25e2602488 to your computer and use it in GitHub Desktop.
Save ibndias/116a420adf8919975ea33c25e2602488 to your computer and use it in GitHub Desktop.
How to remove IP address in Linux

Linux Remove IP

Removing IP shown in ip a command

sudo ip addr del <ip-address>/24 dev <interface>

example: sudo ip addr del 192.168.56.110/24 dev eth0

Remove all IP shown in ifconfig command

sudo ifconfig <interface> 0.0.0.0

example: sudo ifconfig eth0 0.0.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment