nsenter

Run a new command in a running process' namespace. Particularly useful for docker images or chroot jails. More information: <https://manned.org/nsenter>.

Install

All systems
curl cmd.cat/nsenter.sh
Debian Debian
apt-get install util-linux
Ubuntu
apt-get install util-linux
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install util-linux
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install util-linux
OS X
brew install util-linux
Raspbian
apt-get install util-linux
Docker
docker run cmd.cat/nsenter nsenter powered by Commando

Run a new command in a running process' namespace. Particularly useful for docker images or chroot jails. More information: <https://manned.org/nsenter>.

  • Run a specific command using the same namespaces as an existing process:
    nsenter --target pid --all command command_arguments
  • Run a specific command in an existing process's network namespace:
    nsenter --target pid --net command command_arguments
  • Run a specific command in an existing process's PID namespace:
    nsenter --target pid --pid command command_arguments
  • Run a specific command in an existing process's IPC namespace:
    nsenter --target pid --ipc command command_arguments
  • Run a specific command in an existing process's UTS, time, and IPC namespaces:
    nsenter --target pid --uts --time --ipc -- command command_arguments
  • Run a specific command in an existing process's namespace by referencing procfs:
    nsenter --pid=/proc/pid/pid/net -- command command_arguments

© tl;dr; authors and contributors