Interactive shell

Interactive shell procedure for Linux

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

(press on your keyboard) Ctrl+Z
(press on your keyboard) Enter

#If bash shell
stty raw -echo
fg (I won't see my keystrokes, this is normal)
(press on your keyboard) Enter

#If zsh shell
stty raw -echo;fg
(press on your keyboard) Enter

#Then adjusting the shell
export TERM=xterm-256color
#OR
export TERM=xterm
Then
stty rows 32 columns 151 #For the size, do stty size on your own terminal to determine the size

Last updated