Windows XP My Favorite DOS Command March 4, 2005 The exit command will close an MS-DOS prompt. It’s quick, dirty and easy to use. Exit.