Obtaining Interactive Shell

Setting TERM variable

export TERM=xterm256-color
export SHELL=bash

python -c 'import pty; pty.spawn("/bin/bash")'

Obtaining interactive shell (without Python)

script -qc /bin/bash /dev/null
stty raw -echo

Last updated