Explore mode
Explore mode is a special game mode intended for players still learning the basics. It grants several advantages to the player, including the ability to cheat death.
It can be invoked in a new or existing game by starting NetHack with the -X option, setting playmode config option, or in an existing game via the #exploremode extended command. In an existing game, you will be prompted for confirmation. Once entered, a character may not leave explore mode. When an explore mode game ends, the score is not saved to the record file.
Public servers often disable explore mode.
Death
The most prominent feature of explore mode allows you to refuse death at will. When your character would die, you are prompted as follows:
Die? [yn]
Type n, and you receive the message "Okay, so you don't die." The game then continues as normal, with the usual effects of life saving. The amulet of life saving takes priority; wearing one on a valid death will consume the amulet with no prompt. You can refuse any sort of death, even ones that standard life saving wouldn't protect you from. However, you cannot refuse any other end to your game, such as trickery or escaping the dungeon.
If you refuse death from brainlessness, your intelligence is arbitrarily set to 5 ("You feel like a scarecrow."). If you refuse death from self-genocide, you survive as the last of your race or role. Trying to genocide the same thing again consciously will fail, but the uncursed scroll while confused still works.
Save file
Explore mode gives you the option to keep your old save file whenever you restore a game. This allows you to keep a permanent save slot (like many other games), which can be used to undo a sequence of play without having to start a new game. (Note that, if available, wizard mode may be even more powerful for this sort of exploration.)
Do you want to keep the save file? [yn] (n)
Wand of wishing
If you start a new game in explore mode, your character will have a pre-identified uncursed (0:3) wand of wishing, in addition to their standard starting inventory. Existing characters who enter explore mode do not receive the wand.
Enlightenment
Inputting ctrl + x while in explore mode will display attributes as if you had used an uncursed wand or potion of enlightenment.
Strategy
Explore mode has some value for players who install their distro's NetHack binaries on a Unix system, and lack the correct username to enter wizard mode. The main obstacle for these players is the bother of either creating a user account with the correct name, or compiling NetHack from source code. These players can use the explore mode's wand of wishing to play with specific objects.
Some players invoke explore mode on characters they believe have no chance of survival, in order to continue their game when it would otherwise be impossible.
Players in explore mode may develop abnormal strategies. For example, instead of dealing with a soldier ant in an appropriate way, an explore mode player might just melee it, ignoring how many deaths this takes. Then they repeat this process with the next difficult monster, dying hundreds of times in the same game.
Instead of (or as well as) explore mode, consider how Elbereth, proper pet use, or other strategies could help you.