how to exit vi needs improvement or clarity
In Gnome Terminal 3.38.1, with sudo I entered vi and displayed a document. I tried exiting vi by pressing Esc or : (colon) or q or q! but none of these worked and I got out of vi only by pressing the terminal window's Close button.