The editor and the 'shell' (the normal command
interpreter) accept different commands. The
shell (which types '$' at you) understands
"ls", "mv", "cp", "date" and so forth; the
editor understands such commands as 'w' or 'q'.
Type "answer shell" or "answer editor".