Digging
Digging is usually done with a pick-axe, a dwarvish mattock, or a wand of digging. You can also dig if you polymorph into a creature that does not need a pick to use the tunnel attribute (r rock mole, r woodchuck or U umber hulk). Casting the spell of dig has the same effect as zapping a wand of digging.
Digging using a pick-axe or mattock is slow, and takes several turns. Other methods use a single turn.
You can dig in any horizontal direction. You can also attempt to dig upwards and downwards if you use a tool, wand or spell. If you dig upwards, you will be unable to reach the ceiling with a tool, or just loosen a rock from the ceiling and have it fall on your head with a spell or wand.
If you dig downwards with a pick-axe or mattock, you will usually create a pit. To create a pit, you need to apply the tool twice. ("You continue digging downward. You dig a pit in the floor"). If you dig downwards in a pit, you will create a hole and fall through. Zapping a wand of digging downwards instantly creates a hole under normal circumstances.
The ground or the walls in some levels are undiggable. These include the walls of Sokoban, the ground at the bottom of several dungeon branches, walls of the Castle and the Wizard's Tower, and the like. If the floor is undiggable, digging downwards can create a pit but not a hole. The walls of Gehennom are diggable, but the wand and the spell only dig one wall per casting.
Strategy
You can escape by digging downwards and making a hole. You will generally need a one-turn method to dig, such as a wand or spell. Remember that this will deepen your dungeon level, and you might find yourself in a worse position. Monsters will also use this escape technique when they possess a wand of digging, which can be aggravating.
If you do not have a way to cross water, you can access Medusa's island by digging down then taking the upstair from the level below. You should be prepared to kill Medusa.
You must cross solid rock to access the portal on the Plane of Earth. Digging is usually the most convenient method. Fortunately, several digging methods are provided for you on the plane itself, although it pays to go prepared.
It is frequently convenient to dig through the walls of mazes, to make shortcuts between the stairs and minimize the chances that the Wizard of Yendor will show up when you're racing to the upstairs.
Digging is an essential part of the metastrategy digging for victory.
You can identify undiggable levels by attempting to make a hole by digging. If you can't make more than a pit, it is an undiggable level. This is particularly useful for identifying the deepest level of Gehennom, where the vibrating square is located; this level otherwise looks like another level of Gehennom. If you don't want to move deeper when the level is diggable, you can levitate and zap a wand of digging downward.
This page may need to be updated for the current version of NetHack.
It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.
Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to the current version's tag or {{noversion}} as appropriate.