Skip to content

Upgrading Shells to Interactive TTYs

TL;TR

python3 -c 'import pty; pty.spawn("/bin/bash")'
[CTRL-Z]
stty -a
fg
reset
export SHELL=bash
export TERM=xterm-256color
stty rows [N] columns [M]

N and M are defined in the output of stty -a (namely columns and rows).

References