Forrest logo
back to the bpftool tool

bpftool:tldr:6c4b0

bpftool: List `eBPF` program attachments in the kernel networking subsystem.
$ bpftool net list
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the bpftool tool