Best TTY
Spawn Python shell
python -c 'import pty; pty.spawn("/bin/bash")'Background the shell
Ctrl + ZGet current Rows and Columns
stty -a | head -n1 | cut -d ';' -f 2-3 | cut -b2- | sed 's/; /\n/'Bring shell back to the foreground
stty raw -echo; fgSet size for the remote shell (where ROWS and COLS are the values from the 3rd command)
stty rows ROWS cols COLSAdd some colours
export TERM=xterm-256colorReload bash to apply the TERM variable
Last updated