As I know, in a Linux shell environment, I could list the networks links in any specific namespace with ip
, like:
ip netns exec <namespace> ip link show
My question is:
If I have multiple net namespaces, how to list all the links in all the namespaces with a simple command? Or I have to write a script to do so?
You can simply do:
ip link show; ip -all netns exec ip link show
Internally this just does what your script would do - it steps through all namespaces and runs the command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With