tdro

Another wandering soul whispering into the void. If you are looking for my blog you are in the wrong place. The profile and header pictures are brought to you by cdd20.

tdro micro.thedroneely.com view
  • Markdown Plaintext Embed Permalink
  • 82/50 words 27s read

    There’s a quick way to test the offline behaviour of programs on Linux.

    shell
    unshare -c -n bash
    Then only loopback is available.
    shell
    $ ip addr
    1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    List network namespaces with lsns.

    shell
    $ lsns -t net
    NS  TYPE NPROCS PID   USER  NETNSID    COMMAND
    999 net  2      111   user  3          systemd
    888 net  1      222   user  unassigned └─bash
    #gists #linux