4 ms·
Ask HN: Do we still need `-6` for `IP` command?
Seems now `ip` can do the same thing as `ip -6`, so is there any situation that we must use `-6` flag?
- fernvenue 3y agoI'm gonna answer myself, sometimes we do need to add `-6` for IPv6 situation, for example: - `ip -6 r show`: If we don't add `-6`, we will just get the IPv4 route information. - `ip -6 r add`: If we don't add `-6`, when we add default route or something like that, we may miss IPv6. So the answer is yes, we can use `ip` without `-6` when we do something for IPv6, but we still need it for specific situation.
- LinuxBender 3y agoip -6 route del default That does something different than ip route del default
- fernvenue 3y agoYea, that's true!
- mikewarot 3y agoit's the same reason I still have to type grep -i pattern filespec Of course, grep should default to being case insensitive (-i), but it was a different world when it was written.