From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to: navigation, search
cleanup

This article could use a cleanup in order to be more legible and/or presentable. Please help improve this article in any way possible. Remember to follow our editing guidelines when improving existing articles. If you can improve this page, please edit it, or help by discussing possible changes on the talk page.

If you need help with wiki markup, see the wiki markup page. If you want to try out wiki markup without damaging a page, why not use the sandbox?

The official NetHack Guidebook introduced the commands by listing them all in alphabetical order by key, which can be overwhelming. The plan for this page is to instead group the commands into functional groups.

On this page, s indicates the lowercase letter, while S indicates the uppercase letter. To type S, you must hold Shift and press s.

Here, CTRL + X means to hold CTRL and press x (or X, it matters not). NetHack uses "^X" for CTRL + X, so you might also see ^X in this guide. Do not confuse it with ^, which is the caret (often SHIFT + 6), not control key.

If you hold a key down, it repeats, like you were typing in a text editor. For example, press and hold h to move left as far as possible, or repeatedly attack the monster on your left.

The NetHack/Walkthrough introduces these keys more gradually.

Movement[edit]

yuhjklbn[edit]

The hjkl keys move your character to the adjacent square west, south, north, or east. The yubn keys move your character diagonally. If the specified square contains a monster, you attack that monster. Thus you will use these keys much, not only for moving around the dungeon but also for fighting monsters. (Unless you disabled the safe_pet option, you will not attack your own pet or a peaceful monster.)

If number_pad is on, you instead use 12346789. On DOS, the arrow keys tend to work, but on Unix platforms the arrow keys tend to not function. However, NetHack is easier to play if you learn the yuhjklbn keys.

o, c doors[edit]

You need to learn o and c to open and close doors. Closed doors appear on the map as plus signs + in doorways, while open doors appear as - or | (or shaded squares if you have DECgraphics). Just move yourself adjacent to a door, then press o or c followed by the direction of the door.

Only use o or c for doors.

Inventory[edit]

i, I show inventory[edit]

Use i to show your inventory. This is one of the most important keys in the game, because you can use it to check the inventory letters of any of your items! If you want, you can use I to show a fraction of your inventory, for example a list of all your scrolls.

, pickup[edit]

Move your @ onto an item or pile of items, then press , to pick up the item. If there was more than one item, NetHack gives you a menu. You can then press a, b, to select + or deselect - each menu item. Dismiss the menu and pick up the selected items by pressing SPACE. All menus work in a similar manner.

[d], [D] drop[edit]

The inverse of [,], press [d] to drop an item. Then press the inventory letter. The [D] keys give you menus that let you drop multiple items simultaneously.

Using certain items[edit]

You do not need to learn these commands until you find certain items. These commands all work in the same way. Press a key such as e, then press the inventory letter of the item. If you forgot the inventory letter, use * to check your inventory of the item type, or ? if you want try something unusual (like eating your armor or throwing objects that are not weapons).

e food %[edit]

Use e to eat food. In the dungeon, the % sign represents food, a corpse, or anything else that is edible, though it might not be healthy to eat. There are two ways to use this command.

  • You can eat food in your inventory. Simply press e, then the letter of the food item. Most characters start out already carrying some food rations.
  • If you find food on the ground, you can eat it without putting it in your inventory first. Move your @ onto a % then press e; the game will ask whether you want to eat that item. Press y to eat it, or n to choose from your inventory instead. This makes it easy to eat recently-killed monsters.

W, T armor [[edit]

To wear armor from your inventory, press W and the item's letter. To take off armor, press T and the item's letter. Note that these are both uppercase letters, so you need to use SHIFT to type them.

If you use lowercase w, you will wield the armor (as a weapon) instead of wearing it. If you make that mistake, you can press w again to switch to a different weapon.

P, R rings= and amulets"[edit]

To put on a ring or amulet from your inventory, press P and the item's letter. To remove a ring or amulet, press R and the item's letter. If you try to use R to take off armor or T to remove a ring or amulet, the game will tell you the correct command to use.

w weapons )[edit]

Suppose you find a sword or other melee weapon. To wield it, press lowercase w and the item's letter. Whenever you wield a weapon, you automatically unwield your existing weapon, if any. While you wield a weapon, you will always use it when attacking a monster (by moving into it with [yuhjklbn] or the numpad keys).

To fight bare-handed, press w, then the hyphen -. This is useful if you want to fight without a weapon or you want to drop your weapon with d.

t weapons )[edit]

Instead of wielding a weapon, you can try to throw it as a projectile. You can also throw arbitrary items such as rocks and food rations. Press t, then select the item, then select a direction to throw. In NetHack, you can only throw in eight directions (or up and down).

Q, f ranged weapons )[edit]

A ranged weapon is more complex. You need to wield a weapon such as a bow, then throw some ammunition such as arrows. The following combinations are possible:

  • bows with arrows
  • crossbows with crossbow bolts
  • slings with rocks or gems

First, press w to wield a bow. Then, press t, select an arrow, and select a direction. Whenever you throw the correct kind of ammo, you will use your weapon instead of your bare hands.

To check if you are really using the bow, unwield it ( w- ) and try throwing an arrow. Then wield the bow and throw another arrow. While using the bow, the arrow should fly farther.

That said, it can be annoying to use t when you are always throwing the same type of item. In that case, press Q, then type the letter of your favorite projectiles to put them in your "quiver". Then use f to "fire" your ammo. The f command is exactly like t, except that f uses your quiver instead of asking you which item to throw.

z wands /[edit]

When you find a wand, press z to activate the magical function of that wand; then select the letter of that wand. What you do next depends on what the wand does.

r scrolls ? and spellbooks +[edit]

To read a scroll or spellbook, press r and then the letter of the item. By reading it, you will activiate the scroll or memorise the spell, unless something goes wrong.

Once you memorise a spell, you can activate it by pressing Z, then choosing the spell from the menu.

q potions ![edit]

To quaff (drink) a potion, press q, then its letters.

There are other uses for potions:

  • you can use t to throw them at something.
  • you can use #dip to dip something from your inventory into a potion.

a tools ([edit]

To use various tools (pick-axes, lamps), press a. You can also use this to break wands; remember to use z instead if you want to zap a wand. NetHack will ask you for confirmation if you try to break a wand.

The effect of applying a tool depends on its purpose; for example applying a lamp will switch it on or off.

Information[edit]

[CTRL+X][edit]

This sometimes forgotten feature lets you check your character's race, role, gender, and alignment, as well as the names of the Lawful, Neutral, and Chaotic gods. In explore mode, this also reveals some extra information.

[CTRL+P] previous messages[edit]

Advanced information[edit]

You could just check your inventory with [i], but if you want, then you can learn these shortcuts.

[$], [(], [)], [+], [[]

These keys match the symbols of items. [$] counts your gold $ (but you could just read the status line); [(] checks which tools ( you currently use, [)] checks which weapons ) you currently wield; [+] lists the spells from spellbooks + that you memorised, [[] checks which armor [ you currently wear.

[@], [*], [\][edit]

These keys are less obvious; [@] toggles the autopickup option on or off and reminds you of which pickup_types are on; [*] combines several other keys to list which items you currently use; [\] lists some knowledge about items that you recognise.

Advanced movement[edit]

If you play NetHack frequently, you might want to learn these advanced controls.

F, m[edit]

Press uppercase F, then yuhjklbn to attack an adjacent square. Use this when you think that there is an invisible monster there. For the inverse, press m to try to move on to the square when you remember an invisible monster, but you guess that the monster has moved.

[YUHJKLBN][edit]

If you hold [SHIFT] while pressing the direction keys, you continue to move in that direction as far as you can, until you stop at a doorway, pile of objects, stairwell, or other such dungeon feature, or become blocked by some obstacle such as a wall, closed door, or monster. Use SHIFT to move as rapidly as you can, without skipping over stairways. SHIFT is a shortcut against typing more keys; it does not make your character use less turns of game time. However, you might prefer to use [g], which lets you stop before doorways or hallway intersections; see the section after the next.

[CTRL+YUHJKLBN][edit]

Holding [CTRL] while pressing any of [yuhjklbn] has the same affect as using [G]; see the next section.

[g], [G][edit]

Press [g] or [G], then press one of [yuhjklbn] to go in that direction until you find interesting. The main difference between this and using SHIFT is that you will stop one square before a doorway, not on the doorway. Thus, you can use [g] to move to a door, then close it.

If you use lowercase [g], you will also stop at intersections amid corridors. Thus [g] is the best way to move rapidly without accidentally walking too far.

[CTRL+T][edit]

This lets you teleport, but you have to first find a way to gain this ability.

SPACE[edit]

Normally, you use SPACE to dismiss menus or "--More--" prompts.

Otherwise, this does nothing except to say "Unknown command ' '". That is, unless you enabled the rest_on_space option, in which case your character will waste one turn of game time doing nothing. You probably do not want to enable rest_on_space, as holding the space bar would then give monsters enough time to attack you.

If you really need to advance game time while doing nothing, use (or hold) s. At least you have a small chance of discovering a nearby secret door or trap.

Advanced keys, other[edit]

[CTRL+Z][edit]

On Unix platforms, this suspends NetHack and returns to the shell, just as you can suspend other programs.

[!][edit]

On Unix platforms or other systems using a command line, this lets you escape to a shell. NetHack starts this shell as a subprocess, so exit the shell to return to NetHack.