q
Running the "q" command, or entering an End-Of-File (EOF) (typ. Control/D) is the normal way of exiting MGED.