![Forrest logo](/images/logo.png)
bpftool:tldr:6c4b0
The bpftool net list
command is used to display a list of available network namespaces in the Linux kernel.
In Linux, network namespaces provide a way to isolate and virtualize the network stack, allowing separate network environments to coexist on the same system. Each network namespace has its own network devices, IP addresses, routing tables, and firewall rules.
The bpftool
command is a utility that provides various functions for interacting with eBPF (Extended Berkeley Packet Filter) programs and related features in the Linux kernel. The net list
subcommand specifically retrieves and displays information about network namespaces.
When you run the bpftool net list
command, it queries the kernel for the available network namespaces and then prints out a list that contains the names, IDs, and state of each namespace. This can be helpful for troubleshooting, debugging, or monitoring purposes when dealing with network namespaces in a Linux system.