Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Do we still need `-6` for `IP` command?
10 points by fernvenue 11 months ago | hide | past | favorite | 4 comments
Seems now `ip` can do the same thing as `ip -6`, so is there any situation that we must use `-6` flag?



    ip -6 route del default
That does something different than

    ip route del default


Yea, that's true!


I'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.


it'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: