Stabilizing shell

Stabilize your shell:

  1. Import pty module and spawn bash shell

    python3 -c 'import pty;pty.spawn("/bin/bash")'
  2. Press CTRL + Z to background process and get back to your host machine

  3. Use stty command to set terminal line settings and foreground back the target terminal

    stty raw -echo; fg
  4. Set the terminal emulator to xterm:

    export TERM=xterm
  5. Press Enter

Last updated