Quit
NetHack allows a player to quit and abandon their current game through the use of the #quit extended command.[1][2]
Once a player quits a game, there is no way to return to that game without save scumming, or loading from a previous save game if the player is in wizard mode—to that end, NetHack clarifies with the following message:[3]
- Really quit without saving?
Quitting during the tutorial will also prompt the player if they want to return to regular play with [y/n].[4]
When quitting a game, NetHack will ask the player for confirmation with [y/n], and n (no) is the default response; responding with y (yes) will quit. If the paranoid_confirmation:quit option is set, the game will require an explicitly typed [yes] as a response.
To temporarily stop the game in a manner that allows resuming at a later point, use the save command, Shift + S.
History
In NetHack 3.2.3 and previous versions, including Hack and some variants based on those old versions, quitting can be done with the Shift + Q keyboard combination: due to the key combo being rarely used, NetHack 3.3.0 changes the combination to quiver items instead of quitting the game, and the functionality was instead moved to the extended command—from that version to NetHack 3.4.3, the first use of the quiver command will remind the player to use "#quit" in order to quit. The reminder is dropped starting in NetHack 3.6.0.
From NetHack 3.3.0 to NetHack 3.6.7, including some variants based on those versions, quitting a game can be performed with the keyboard combinations Meta key + q or ctrl + c. NetHack 5.0.0 changes it so that the command is not bound to any key combo via commit 8849f66d, in order to prevent conflicts with Spanish keyboard layouts that interpret the n-with-tilde key (or ñ) as same as Meta key + q while it is next to l (which performs looting and also asks for confirmation). The clarification that the command quits without saving is added via commit 904e3ffe.
Encyclopedia entry
Maltar: [...] I remembered a little saying I learned my first day at the academy.
Natalie: Yeah, yeah, I know. Winners never quit and quitters never win.
Maltar: What? No! Winners never quit and quitters should be cast into the Flaming Pit of Death.