How does mac exit sudo -s and return to the previous

  question, vim

How to switch?

clipboard.png

Replace it with the previous:
xxx@xxx:~/
such

Ctrl + D